Build Information
Successful build of SwiftWhisper, reference master (c34019
), with Swift 6.0 for Linux on 3 Nov 2024 11:07:14 UTC.
Swift 6 data race errors: 1
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-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.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/exPHAT/SwiftWhisper.git
Reference: master
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/exPHAT/SwiftWhisper
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at c340197 Update fast branch commit hash
Submodule path 'whisper.cpp': checked out '95b02d76b04d18e4ce37ed8353a1f0797f1717ea'
Submodule path 'whisper.cpp/bindings/ios': checked out 'de46d9e7817fe851c109d66080239d415812d32a'
Submodule 'whisper.cpp' (https://github.com/ggerganov/whisper.cpp.git) registered for path 'whisper.cpp'
Cloning into '/host/spi-builder-workspace/whisper.cpp'...
Submodule 'bindings/ios' (https://github.com/ggerganov/whisper.spm) registered for path 'whisper.cpp/bindings/ios'
Cloning into '/host/spi-builder-workspace/whisper.cpp/bindings/ios'...
Cloned https://github.com/exPHAT/SwiftWhisper.git
Revision (git rev-parse @):
c340197966ebd264f3135d3955874b40f8ed58bc
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/exPHAT/SwiftWhisper.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/exPHAT/SwiftWhisper.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-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:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/4] Write sources
[1/4] Write swift-version-24593BA9C3E375BF.txt
[2/4] Compiling whisper_cpp ggml.c
[3/4] Compiling whisper_cpp whisper.cpp
[5/12] Compiling SwiftWhisper WhisperSamplingStrategy.swift
[6/12] Compiling SwiftWhisper WhisperParams.swift
/host/spi-builder-workspace/Sources/SwiftWhisper/WhisperParams.swift:7:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'WhisperParams' may have shared mutable state; this is an error in the Swift 6 language mode
4 | // swiftlint:disable identifier_name
5 | @dynamicMemberLookup
6 | public class WhisperParams {
| `- note: class 'WhisperParams' does not conform to the 'Sendable' protocol
7 | public static let `default` = WhisperParams(strategy: .greedy)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'WhisperParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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
8 |
9 | internal var whisperParams: whisper_full_params
[7/12] Compiling SwiftWhisper Whisper.swift
/host/spi-builder-workspace/Sources/SwiftWhisper/WhisperParams.swift:7:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'WhisperParams' may have shared mutable state; this is an error in the Swift 6 language mode
4 | // swiftlint:disable identifier_name
5 | @dynamicMemberLookup
6 | public class WhisperParams {
| `- note: class 'WhisperParams' does not conform to the 'Sendable' protocol
7 | public static let `default` = WhisperParams(strategy: .greedy)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'WhisperParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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
8 |
9 | internal var whisperParams: whisper_full_params
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:72:17: warning: capture of 'delegate' with non-sendable type 'any WhisperDelegate' in a `@Sendable` closure; this is an error in the Swift 6 language mode
70 |
71 | DispatchQueue.main.async {
72 | delegate.whisper(whisper, didProcessNewSegments: newSegments, atIndex: Int(startIndex))
| `- warning: capture of 'delegate' with non-sendable type 'any WhisperDelegate' in a `@Sendable` closure; this is an error in the Swift 6 language mode
73 | }
74 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/WhisperDelegate.swift:3:17: note: protocol 'WhisperDelegate' does not conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public protocol WhisperDelegate: AnyObject {
| `- note: protocol 'WhisperDelegate' does not conform to the 'Sendable' protocol
4 | func whisper(_ aWhisper: Whisper, didUpdateProgress progress: Double)
5 | func whisper(_ aWhisper: Whisper, didProcessNewSegments segments: [Segment], atIndex index: Int)
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:72:34: warning: capture of 'whisper' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 | import whisper_cpp
3 |
4 | public class Whisper {
| `- note: class 'Whisper' does not conform to the 'Sendable' protocol
5 | private let whisperContext: OpaquePointer
6 | private var unmanagedSelf: Unmanaged<Whisper>?
:
70 |
71 | DispatchQueue.main.async {
72 | delegate.whisper(whisper, didProcessNewSegments: newSegments, atIndex: Int(startIndex))
| `- warning: capture of 'whisper' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
73 | }
74 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:72:66: warning: capture of 'newSegments' with non-sendable type '[Segment]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
70 |
71 | DispatchQueue.main.async {
72 | delegate.whisper(whisper, didProcessNewSegments: newSegments, atIndex: Int(startIndex))
| `- warning: capture of 'newSegments' with non-sendable type '[Segment]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
73 | }
74 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Segment.swift:3:15: note: consider making struct 'Segment' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public struct Segment: Equatable {
| `- note: consider making struct 'Segment' conform to the 'Sendable' protocol
4 | public let startTime: Int
5 | public let endTime: Int
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:72:66: warning: reference to captured var 'newSegments' in concurrently-executing code; this is an error in the Swift 6 language mode
70 |
71 | DispatchQueue.main.async {
72 | delegate.whisper(whisper, didProcessNewSegments: newSegments, atIndex: Int(startIndex))
| `- warning: reference to captured var 'newSegments' in concurrently-executing code; this is an error in the Swift 6 language mode
73 | }
74 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:94:17: warning: capture of 'whisper' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 | import whisper_cpp
3 |
4 | public class Whisper {
| `- note: class 'Whisper' does not conform to the 'Sendable' protocol
5 | private let whisperContext: OpaquePointer
6 | private var unmanagedSelf: Unmanaged<Whisper>?
:
92 |
93 | DispatchQueue.main.async {
94 | whisper.delegate?.whisper(whisper, didUpdateProgress: Double(progress) / 100)
| `- warning: capture of 'whisper' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:127:26: warning: capture of 'self' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 | import whisper_cpp
3 |
4 | public class Whisper {
| `- note: class 'Whisper' does not conform to the 'Sendable' protocol
5 | private let whisperContext: OpaquePointer
6 | private var unmanagedSelf: Unmanaged<Whisper>?
:
125 |
126 | DispatchQueue.global(qos: .userInitiated).async {
127 | whisper_full(self.whisperContext, self.params.whisperParams, audioFrames, Int32(audioFrames.count))
| `- warning: capture of 'self' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
128 |
129 | let segmentCount = whisper_full_n_segments(self.whisperContext)
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:156:21: warning: capture of 'wrappedCompletionHandler' with non-sendable type '(Result<[Segment], any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
154 |
155 | self.delegate?.whisper(self, didErrorWith: error)
156 | wrappedCompletionHandler(.failure(error))
| |- warning: capture of 'wrappedCompletionHandler' with non-sendable type '(Result<[Segment], any Error>) -> 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'
157 | }
158 | } else {
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:151:21: warning: capture of 'cancelCallback' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
149 | DispatchQueue.main.async {
150 | // Should cancel callback be called after delegate and completionHandler?
151 | cancelCallback()
| |- warning: capture of 'cancelCallback' with non-sendable type '() -> 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'
152 |
153 | let error = WhisperError.cancelled
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:155:21: warning: capture of 'self' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 | import whisper_cpp
3 |
4 | public class Whisper {
| `- note: class 'Whisper' does not conform to the 'Sendable' protocol
5 | private let whisperContext: OpaquePointer
6 | private var unmanagedSelf: Unmanaged<Whisper>?
:
153 | let error = WhisperError.cancelled
154 |
155 | self.delegate?.whisper(self, didErrorWith: error)
| `- warning: capture of 'self' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
156 | wrappedCompletionHandler(.failure(error))
157 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:156:21: warning: capture of 'wrappedCompletionHandler' with non-sendable type '(Result<[Segment], any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
154 |
155 | self.delegate?.whisper(self, didErrorWith: error)
156 | wrappedCompletionHandler(.failure(error))
| |- warning: capture of 'wrappedCompletionHandler' with non-sendable type '(Result<[Segment], any Error>) -> 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'
157 | }
158 | } else {
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:160:21: warning: capture of 'self' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
2 | import whisper_cpp
3 |
4 | public class Whisper {
| `- note: class 'Whisper' does not conform to the 'Sendable' protocol
5 | private let whisperContext: OpaquePointer
6 | private var unmanagedSelf: Unmanaged<Whisper>?
:
158 | } else {
159 | DispatchQueue.main.async {
160 | self.delegate?.whisper(self, didCompleteWithSegments: segments)
| `- warning: capture of 'self' with non-sendable type 'Whisper' in a `@Sendable` closure; this is an error in the Swift 6 language mode
161 | wrappedCompletionHandler(.success(segments))
162 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:160:75: warning: capture of 'segments' with non-sendable type '[Segment]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
158 | } else {
159 | DispatchQueue.main.async {
160 | self.delegate?.whisper(self, didCompleteWithSegments: segments)
| `- warning: capture of 'segments' with non-sendable type '[Segment]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
161 | wrappedCompletionHandler(.success(segments))
162 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Segment.swift:3:15: note: consider making struct 'Segment' conform to the 'Sendable' protocol
1 | import Foundation
2 |
3 | public struct Segment: Equatable {
| `- note: consider making struct 'Segment' conform to the 'Sendable' protocol
4 | public let startTime: Int
5 | public let endTime: Int
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:161:21: warning: capture of 'wrappedCompletionHandler' with non-sendable type '(Result<[Segment], any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
159 | DispatchQueue.main.async {
160 | self.delegate?.whisper(self, didCompleteWithSegments: segments)
161 | wrappedCompletionHandler(.success(segments))
| |- warning: capture of 'wrappedCompletionHandler' with non-sendable type '(Result<[Segment], any Error>) -> 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'
162 | }
163 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:160:75: warning: reference to captured var 'segments' in concurrently-executing code; this is an error in the Swift 6 language mode
158 | } else {
159 | DispatchQueue.main.async {
160 | self.delegate?.whisper(self, didCompleteWithSegments: segments)
| `- warning: reference to captured var 'segments' in concurrently-executing code; this is an error in the Swift 6 language mode
161 | wrappedCompletionHandler(.success(segments))
162 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:161:55: warning: reference to captured var 'segments' in concurrently-executing code; this is an error in the Swift 6 language mode
159 | DispatchQueue.main.async {
160 | self.delegate?.whisper(self, didCompleteWithSegments: segments)
161 | wrappedCompletionHandler(.success(segments))
| `- warning: reference to captured var 'segments' in concurrently-executing code; this is an error in the Swift 6 language mode
162 | }
163 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:72:17: warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
70 |
71 | DispatchQueue.main.async {
72 | delegate.whisper(whisper, didProcessNewSegments: newSegments, atIndex: Int(startIndex))
| |- warning: sending 'delegate' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'delegate' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:72:34: warning: sending 'whisper' risks causing data races; this is an error in the Swift 6 language mode
70 |
71 | DispatchQueue.main.async {
72 | delegate.whisper(whisper, didProcessNewSegments: newSegments, atIndex: Int(startIndex))
| |- warning: sending 'whisper' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'whisper' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:94:17: warning: sending 'whisper' risks causing data races; this is an error in the Swift 6 language mode
92 |
93 | DispatchQueue.main.async {
94 | whisper.delegate?.whisper(whisper, didUpdateProgress: Double(progress) / 100)
| |- warning: sending 'whisper' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'whisper' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
95 | }
96 | }
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:151:21: warning: sending 'cancelCallback' risks causing data races; this is an error in the Swift 6 language mode
147 |
148 | if let cancelCallback = self.cancelCallback {
149 | DispatchQueue.main.async {
| `- note: access can happen concurrently
150 | // Should cancel callback be called after delegate and completionHandler?
151 | cancelCallback()
| |- warning: sending 'cancelCallback' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'cancelCallback' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
152 |
153 | let error = WhisperError.cancelled
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:155:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
153 | let error = WhisperError.cancelled
154 |
155 | self.delegate?.whisper(self, didErrorWith: error)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
156 | wrappedCompletionHandler(.failure(error))
157 | }
:
163 | }
164 |
165 | self.frameCount = nil
| `- note: access can happen concurrently
166 | self.cancelCallback = nil
167 | self.inProgress = false
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:160:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
158 | } else {
159 | DispatchQueue.main.async {
160 | self.delegate?.whisper(self, didCompleteWithSegments: segments)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
161 | wrappedCompletionHandler(.success(segments))
162 | }
163 | }
164 |
165 | self.frameCount = nil
| `- note: access can happen concurrently
166 | self.cancelCallback = nil
167 | self.inProgress = false
/host/spi-builder-workspace/Sources/SwiftWhisper/Whisper.swift:184:26: warning: sending 'segments' risks causing data races; this is an error in the Swift 6 language mode
182 | switch result {
183 | case .success(let segments):
184 | cont.resume(returning: segments)
| |- warning: sending 'segments' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'segments' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
185 | case .failure(let error):
186 | cont.resume(throwing: error)
[8/12] Compiling SwiftWhisper Segment.swift
[9/12] Compiling SwiftWhisper WhisperLanguage.swift
[10/12] Emitting module SwiftWhisper
/host/spi-builder-workspace/Sources/SwiftWhisper/WhisperParams.swift:7:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'WhisperParams' may have shared mutable state; this is an error in the Swift 6 language mode
4 | // swiftlint:disable identifier_name
5 | @dynamicMemberLookup
6 | public class WhisperParams {
| `- note: class 'WhisperParams' does not conform to the 'Sendable' protocol
7 | public static let `default` = WhisperParams(strategy: .greedy)
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'WhisperParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' 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
8 |
9 | internal var whisperParams: whisper_full_params
[11/12] Compiling SwiftWhisper WhisperDelegate.swift
[12/12] Compiling SwiftWhisper WhisperError.swift
Build complete! (29.32s)
Build complete.
{
"cxx_language_standard" : "c++11",
"dependencies" : [
],
"manifest_display_name" : "SwiftWhisper",
"name" : "SwiftWhisper",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "SwiftWhisper",
"targets" : [
"SwiftWhisper"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "whisper_cpp",
"module_type" : "ClangTarget",
"name" : "whisper_cpp",
"path" : "Sources/whisper_cpp",
"product_memberships" : [
"SwiftWhisper"
],
"sources" : [
"ggml.c",
"whisper.cpp"
],
"type" : "library"
},
{
"c99name" : "WhisperTests",
"module_type" : "SwiftTarget",
"name" : "WhisperTests",
"path" : "Tests/WhisperTests",
"resources" : [
{
"path" : "/host/spi-builder-workspace/Tests/WhisperTests/TestResources",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"File Tests/AudioFileTestCase.swift",
"File Tests/ModelFileTestCase.swift",
"File Tests/ResourceDependentTestCase.swift",
"Model Tests/LoadModelTests.swift",
"Transcription Tests/TranscriptionCancellationTests.swift",
"Transcription Tests/TranscriptionParameterTests.swift",
"Transcription Tests/TranscriptionTests.swift"
],
"target_dependencies" : [
"SwiftWhisper"
],
"type" : "test"
},
{
"c99name" : "SwiftWhisper",
"module_type" : "SwiftTarget",
"name" : "SwiftWhisper",
"path" : "Sources/SwiftWhisper",
"product_memberships" : [
"SwiftWhisper"
],
"sources" : [
"Segment.swift",
"Whisper.swift",
"WhisperDelegate.swift",
"WhisperError.swift",
"WhisperLanguage.swift",
"WhisperParams.swift",
"WhisperSamplingStrategy.swift"
],
"target_dependencies" : [
"whisper_cpp"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.