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

Failed to build ElevenlabsSwift, reference main (de77f0), with Swift 6.0 for macOS (SPM) on 14 Sep 2024 05:59:32 UTC.

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/ArchieGoodwin/ElevenlabsSwift.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/ArchieGoodwin/ElevenlabsSwift
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at de77f0b Merge pull request #1 from bcherry/main
Cloned https://github.com/ArchieGoodwin/ElevenlabsSwift.git
Revision (git rev-parse @):
de77f0b1a7ca16762b6d2d75bf4fee31f3709833
SUCCESS checkout https://github.com/ArchieGoodwin/ElevenlabsSwift.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/ArchieGoodwin/ElevenlabsSwift.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/4] Emitting module ElevenlabsSwift
[4/4] Compiling ElevenlabsSwift ElevenlabsSwift.swift
/Users/admin/builder/spi-builder-workspace/Sources/ElevenlabsSwift/ElevenlabsSwift.swift:24:47: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  2 |
  3 |
  4 | public class ElevenlabsSwift {
    |              `- note: add @available attribute to enclosing class
  5 |     private var elevenLabsAPI: String
  6 |
    :
 11 |     private let baseURL = "https://api.elevenlabs.io"
 12 |
 13 |     public func fetchVoices() async throws -> [Voice]
    |                 `- note: add @available attribute to enclosing instance method
 14 |     {
 15 |
    :
 22 |
 23 |         do {
 24 |             let (data, _) = try await session.data(for: request)
    |                                               |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                               `- note: add 'if #available' version check
 25 |
 26 |             let userResponse: VoicesResponse = try JSONDecoder().decode(VoicesResponse.self, from: data)
/Users/admin/builder/spi-builder-workspace/Sources/ElevenlabsSwift/ElevenlabsSwift.swift:58:47: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  2 |
  3 |
  4 | public class ElevenlabsSwift {
    |              `- note: add @available attribute to enclosing class
  5 |     private var elevenLabsAPI: String
  6 |
    :
 36 |     }
 37 |
 38 |     public func textToSpeech(voice_id: String, text: String, model: String? = nil) async throws -> URL
    |                 `- note: add @available attribute to enclosing instance method
 39 |     {
 40 |
    :
 56 |
 57 |         do {
 58 |             let (data, _) = try await session.data(for: request)
    |                                               |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                               `- note: add 'if #available' version check
 59 |             print(data)
 60 |
/Users/admin/builder/spi-builder-workspace/Sources/ElevenlabsSwift/ElevenlabsSwift.swift:141:17: warning: capture of 'completion' with non-sendable type '(String?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
139 |             if let error = error {
140 |                 print("Error: \(error)")
141 |                 completion(nil)
    |                 |- warning: capture of 'completion' with non-sendable type '(String?) -> 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'
142 |             } else if let data = data {
143 |                 if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 {
/Users/admin/builder/spi-builder-workspace/Sources/ElevenlabsSwift/ElevenlabsSwift.swift:179:47: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  2 |
  3 |
  4 | public class ElevenlabsSwift {
    |              `- note: add @available attribute to enclosing class
  5 |     private var elevenLabsAPI: String
  6 |
    :
164 |     }
165 |
166 |     public func deleteVoice(voiceId: String) async throws {
    |                 `- note: add @available attribute to enclosing instance method
167 |         guard let url = URL(string: "\(baseURL)/v1/voices/\(voiceId)") else {
168 |             print("Invalid URL")
    :
177 |
178 |         do {
179 |             let (data, _) = try await session.data(for: request)
    |                                               |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                               `- note: add 'if #available' version check
180 |
181 |         }
/Users/admin/builder/spi-builder-workspace/Sources/ElevenlabsSwift/ElevenlabsSwift.swift:179:18: warning: immutable value 'data' was never used; consider replacing with '_' or removing it
177 |
178 |         do {
179 |             let (data, _) = try await session.data(for: request)
    |                  `- warning: immutable value 'data' was never used; consider replacing with '_' or removing it
180 |
181 |         }
/Users/admin/builder/spi-builder-workspace/Sources/ElevenlabsSwift/ElevenlabsSwift.swift:228:17: warning: capture of 'completion' with non-sendable type '(Bool) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
226 |             if let error = error {
227 |                 print("Error: \(error)")
228 |                 completion(false)
    |                 |- warning: capture of 'completion' with non-sendable type '(Bool) -> 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'
229 |             } else if let data = data {
230 |                 if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 {
BUILD FAILURE 6.0 macosSpm