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 TextureMap, reference main (bc8f1c), with Swift 6.0 (beta) for macOS (SPM) on 14 Sep 2024 06:52:41 UTC.

Swift 6 data race errors: 2

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/heestand-xyz/TextureMap.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/heestand-xyz/TextureMap
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at bc8f1cb Render Tweaks
Cloned https://github.com/heestand-xyz/TextureMap.git
Revision (git rev-parse @):
bc8f1cb56c1b558eeebb1ae15c2e24c04bfb6ead
SUCCESS checkout https://github.com/heestand-xyz/TextureMap.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/heestand-xyz/TextureMap.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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-117DEE11B69C53C9.txt
[3/15] Compiling TextureMap TMAxis.swift
[4/16] Compiling TextureMap MTLTexture.swift
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:15:30: warning: 'image(texture:colorSpace:bits:)' is deprecated: Please use the sync function in a task.
 13 |
 14 |     public func image(colorSpace: TMColorSpace, bits: TMBits) async throws -> TMImage {
 15 |         try await TextureMap.image(texture: self, colorSpace: colorSpace, bits: bits)
    |                              `- warning: 'image(texture:colorSpace:bits:)' is deprecated: Please use the sync function in a task.
 16 |     }
 17 | }
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:43:52: warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
 41 |         let resolution = CGSize(width: width, height: height)
 42 |         let bits = try TMBits(texture: self)
 43 |         let targetTexture: MTLTexture = try await .empty(resolution: resolution, bits: bits, usage: .write)
    |                                                    `- warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
 44 |
 45 |         conversion.encode(commandBuffer: commandBuffer, sourceTexture: self, destinationTexture: targetTexture)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:11:16: warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                `- warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
Metal.MTLDevice:2:17: note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  1 | @available(macOS 10.11, *)
  2 | public protocol MTLDevice : NSObjectProtocol {
    |                 `- note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  3 |     var name: String { get }
  4 |     @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  4 |
  5 | import Foundation
  6 | import VideoToolbox
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  7 | import MetalKit
  8 |
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                |- note: annotate 'metalDevice' 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
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:163:50: warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
161 |         let bits = try TMBits(texture: self)
162 |
163 |         let textureCopy: MTLTexture = try await .empty(resolution: CGSize(width: width, height: height), bits: bits)
    |                                                  `- warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
164 |
165 |         guard let commandQueue = TextureMap.metalDevice.makeCommandQueue() else {
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:88:30: warning: sending 'texture' risks causing data races; this is an error in the Swift 6 language mode
 86 |                 let texture: MTLTexture = try .empty(resolution: resolution, bits: bits, swapRedAndBlue: swapRedAndBlue, usage: usage)
 87 |
 88 |                 continuation.resume(returning: texture)
    |                              |- warning: sending 'texture' risks causing data races; this is an error in the Swift 6 language mode
    |                              `- note: task-isolated 'texture' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
 89 |
 90 |             } catch {
[5/16] Compiling TextureMap Array+MTLTexture.swift
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:15:30: warning: 'image(texture:colorSpace:bits:)' is deprecated: Please use the sync function in a task.
 13 |
 14 |     public func image(colorSpace: TMColorSpace, bits: TMBits) async throws -> TMImage {
 15 |         try await TextureMap.image(texture: self, colorSpace: colorSpace, bits: bits)
    |                              `- warning: 'image(texture:colorSpace:bits:)' is deprecated: Please use the sync function in a task.
 16 |     }
 17 | }
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:43:52: warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
 41 |         let resolution = CGSize(width: width, height: height)
 42 |         let bits = try TMBits(texture: self)
 43 |         let targetTexture: MTLTexture = try await .empty(resolution: resolution, bits: bits, usage: .write)
    |                                                    `- warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
 44 |
 45 |         conversion.encode(commandBuffer: commandBuffer, sourceTexture: self, destinationTexture: targetTexture)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:11:16: warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                `- warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
Metal.MTLDevice:2:17: note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  1 | @available(macOS 10.11, *)
  2 | public protocol MTLDevice : NSObjectProtocol {
    |                 `- note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  3 |     var name: String { get }
  4 |     @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  4 |
  5 | import Foundation
  6 | import VideoToolbox
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  7 | import MetalKit
  8 |
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                |- note: annotate 'metalDevice' 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
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:163:50: warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
161 |         let bits = try TMBits(texture: self)
162 |
163 |         let textureCopy: MTLTexture = try await .empty(resolution: CGSize(width: width, height: height), bits: bits)
    |                                                  `- warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
164 |
165 |         guard let commandQueue = TextureMap.metalDevice.makeCommandQueue() else {
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Extensions/MTLTexture.swift:88:30: warning: sending 'texture' risks causing data races; this is an error in the Swift 6 language mode
 86 |                 let texture: MTLTexture = try .empty(resolution: resolution, bits: bits, swapRedAndBlue: swapRedAndBlue, usage: usage)
 87 |
 88 |                 continuation.resume(returning: texture)
    |                              |- warning: sending 'texture' risks causing data races; this is an error in the Swift 6 language mode
    |                              `- note: task-isolated 'texture' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
 89 |
 90 |             } catch {
[6/16] Compiling TextureMap TMBits.swift
[7/16] Compiling TextureMap TexureMap+Raw.swift
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TexureMap+Raw.swift:15:14: warning: associated value 'unsupportedBits' of 'Sendable'-conforming enum 'TMRawError' has non-sendable type 'TMBits'; this is an error in the Swift 6 language mode
 13 |
 14 |         case badResolution
 15 |         case unsupportedBits(TMBits)
    |              `- warning: associated value 'unsupportedBits' of 'Sendable'-conforming enum 'TMRawError' has non-sendable type 'TMBits'; this is an error in the Swift 6 language mode
 16 |         case unsupportedOS
 17 |         case unsupportedOSVersion
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Types/TMBits.swift:8:13: note: consider making enum 'TMBits' conform to the 'Sendable' protocol
  6 | import MetalKit
  7 |
  8 | public enum TMBits: Int, Codable, CaseIterable, Comparable {
    |             `- note: consider making enum 'TMBits' conform to the 'Sendable' protocol
  9 |
 10 |     case _8 = 8
[8/16] Compiling TextureMap TMColor.swift
[9/16] Compiling TextureMap TMError.swift
[10/16] Compiling TextureMap TMColorSpace.swift
[11/16] Emitting module TextureMap
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:11:16: warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                `- warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
Metal.MTLDevice:2:17: note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  1 | @available(macOS 10.11, *)
  2 | public protocol MTLDevice : NSObjectProtocol {
    |                 `- note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  3 |     var name: String { get }
  4 |     @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  4 |
  5 | import Foundation
  6 | import VideoToolbox
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  7 | import MetalKit
  8 |
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                |- note: annotate 'metalDevice' 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
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TexureMap+Raw.swift:15:14: warning: associated value 'unsupportedBits' of 'Sendable'-conforming enum 'TMRawError' has non-sendable type 'TMBits'; this is an error in the Swift 6 language mode
 13 |
 14 |         case badResolution
 15 |         case unsupportedBits(TMBits)
    |              `- warning: associated value 'unsupportedBits' of 'Sendable'-conforming enum 'TMRawError' has non-sendable type 'TMBits'; this is an error in the Swift 6 language mode
 16 |         case unsupportedOS
 17 |         case unsupportedOSVersion
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Types/TMBits.swift:8:13: note: consider making enum 'TMBits' conform to the 'Sendable' protocol
  6 | import MetalKit
  7 |
  8 | public enum TMBits: Int, Codable, CaseIterable, Comparable {
    |             `- note: consider making enum 'TMBits' conform to the 'Sendable' protocol
  9 |
 10 |     case _8 = 8
[12/16] Compiling TextureMap CGSize.swift
[13/16] Compiling TextureMap CVPixelBuffer.swift
[14/16] Compiling TextureMap MTLTexture+sample.swift
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Texture/MTLTexture+sample.swift:63:52: warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
61 |         }
62 |
63 |         let targetTexture: MTLTexture = try await .empty(resolution: resolution, bits: bits)
   |                                                    `- warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
64 |
65 |         let sourceOrigin = MTLOrigin(x: axis == .x ? index : 0,
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:11:16: warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                `- warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
Metal.MTLDevice:2:17: note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  1 | @available(macOS 10.11, *)
  2 | public protocol MTLDevice : NSObjectProtocol {
    |                 `- note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  3 |     var name: String { get }
  4 |     @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  4 |
  5 | import Foundation
  6 | import VideoToolbox
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  7 | import MetalKit
  8 |
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                |- note: annotate 'metalDevice' 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
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:233:30: warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
231 |                 let image = try image(texture: texture, colorSpace: colorSpace, bits: bits)
232 |
233 |                 continuation.resume(returning: image)
    |                              |- warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
    |                              `- note: task-isolated 'image' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
234 |
235 |             } catch {
[15/16] Compiling TextureMap TextureMap.swift
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/Texture/MTLTexture+sample.swift:63:52: warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
61 |         }
62 |
63 |         let targetTexture: MTLTexture = try await .empty(resolution: resolution, bits: bits)
   |                                                    `- warning: 'empty(resolution:bits:swapRedAndBlue:usage:)' is deprecated: Please use the sync function in a task.
64 |
65 |         let sourceOrigin = MTLOrigin(x: axis == .x ? index : 0,
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:11:16: warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                `- warning: static property 'metalDevice' is not concurrency-safe because non-'Sendable' type 'any MTLDevice' may have shared mutable state; this is an error in the Swift 6 language mode
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
Metal.MTLDevice:2:17: note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  1 | @available(macOS 10.11, *)
  2 | public protocol MTLDevice : NSObjectProtocol {
    |                 `- note: protocol 'MTLDevice' does not conform to the 'Sendable' protocol
  3 |     var name: String { get }
  4 |     @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  4 |
  5 | import Foundation
  6 | import VideoToolbox
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Metal'
  7 | import MetalKit
  8 |
  9 | public struct TextureMap {
 10 |
 11 |     static let metalDevice: MTLDevice = {
    |                |- note: annotate 'metalDevice' 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
 12 |         guard let metalDevice = MTLCreateSystemDefaultDevice() else {
 13 |             fatalError("TextureMap: Default metal device not found.")
/Users/admin/builder/spi-builder-workspace/Sources/TextureMap/TextureMap.swift:233:30: warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
231 |                 let image = try image(texture: texture, colorSpace: colorSpace, bits: bits)
232 |
233 |                 continuation.resume(returning: image)
    |                              |- warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
    |                              `- note: task-isolated 'image' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
234 |
235 |             } catch {
[16/16] Compiling TextureMap TMImage.swift
Build complete! (17.27s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "TextureMap",
  "name" : "TextureMap",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "16.0"
    },
    {
      "name" : "tvos",
      "version" : "16.0"
    },
    {
      "name" : "macos",
      "version" : "13.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    }
  ],
  "products" : [
    {
      "name" : "TextureMap",
      "targets" : [
        "TextureMap"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "TextureMapTests",
      "module_type" : "SwiftTarget",
      "name" : "TextureMapTests",
      "path" : "Tests/TextureMapTests",
      "sources" : [
        "TextureMapTests.swift"
      ],
      "target_dependencies" : [
        "TextureMap"
      ],
      "type" : "test"
    },
    {
      "c99name" : "TextureMap",
      "module_type" : "SwiftTarget",
      "name" : "TextureMap",
      "path" : "Sources/TextureMap",
      "product_memberships" : [
        "TextureMap"
      ],
      "sources" : [
        "Extensions/CGSize.swift",
        "Extensions/CVPixelBuffer.swift",
        "Extensions/MTLTexture.swift",
        "Texture/Array+MTLTexture.swift",
        "Texture/MTLTexture+sample.swift",
        "TextureMap.swift",
        "TexureMap+Raw.swift",
        "Types/TMAxis.swift",
        "Types/TMBits.swift",
        "Types/TMColor.swift",
        "Types/TMColorSpace.swift",
        "Types/TMError.swift",
        "Types/TMImage.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.