Build Information
Successful build of SCrypto, reference master (11de70
), with Swift 6.1 for macOS (SPM) on 29 Apr 2025 23:11:02 UTC.
Swift 6 data race errors: 2
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.61.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/sgl0v/SCrypto.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sgl0v/SCrypto
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 11de700 Fixed code coverage report.
Cloned https://github.com/sgl0v/SCrypto.git
Revision (git rev-parse @):
11de70020265d863bc469636094b8580bd70eb5e
SUCCESS checkout https://github.com/sgl0v/SCrypto.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/sgl0v/SCrypto.git
https://github.com/sgl0v/SCrypto.git
{
"dependencies" : [
],
"manifest_display_name" : "SCrypto",
"name" : "SCrypto",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.11"
},
{
"name" : "ios",
"version" : "9.0"
}
],
"products" : [
{
"name" : "SCrypto",
"targets" : [
"SCrypto"
],
"type" : {
"library" : [
"dynamic"
]
}
}
],
"targets" : [
{
"c99name" : "SCrypto_Tests",
"module_type" : "SwiftTarget",
"name" : "SCrypto Tests",
"path" : "Tests",
"sources" : [
"SCryptoTests.swift"
],
"target_dependencies" : [
"SCrypto"
],
"type" : "test"
},
{
"c99name" : "SCrypto",
"module_type" : "SwiftTarget",
"name" : "SCrypto",
"path" : "Source",
"product_memberships" : [
"SCrypto"
],
"sources" : [
"SCrypto.swift"
],
"type" : "library"
}
],
"tools_version" : "5.1"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/4] Write sources
[1/4] Write swift-version-2F0A5646E1D333AE.txt
[3/6] Emitting module SCrypto
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:533:27: warning: static property 'PKCS7Padding' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
522 | * Options for block ciphers
523 | */
524 | public struct Options : OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
525 | public typealias RawValue = CCOptions
526 | public let rawValue: RawValue
:
531 |
532 | /// Perform the PKCS7 padding.
533 | public static let PKCS7Padding = Options(rawValue: RawValue(kCCOptionPKCS7Padding))
| |- warning: static property 'PKCS7Padding' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'PKCS7Padding' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
534 | /// Electronic Code Book Mode. This block cipher mode is not recommended for use. Default mode is CBC.
535 | public static let ECBMode = Options(rawValue: RawValue(kCCOptionECBMode))
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:535:27: warning: static property 'ECBMode' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
522 | * Options for block ciphers
523 | */
524 | public struct Options : OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
525 | public typealias RawValue = CCOptions
526 | public let rawValue: RawValue
:
533 | public static let PKCS7Padding = Options(rawValue: RawValue(kCCOptionPKCS7Padding))
534 | /// Electronic Code Book Mode. This block cipher mode is not recommended for use. Default mode is CBC.
535 | public static let ECBMode = Options(rawValue: RawValue(kCCOptionECBMode))
| |- warning: static property 'ECBMode' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ECBMode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
536 | }
537 |
[4/6] Compiling SCrypto SCrypto.swift
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:533:27: warning: static property 'PKCS7Padding' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
522 | * Options for block ciphers
523 | */
524 | public struct Options : OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
525 | public typealias RawValue = CCOptions
526 | public let rawValue: RawValue
:
531 |
532 | /// Perform the PKCS7 padding.
533 | public static let PKCS7Padding = Options(rawValue: RawValue(kCCOptionPKCS7Padding))
| |- warning: static property 'PKCS7Padding' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'PKCS7Padding' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
534 | /// Electronic Code Book Mode. This block cipher mode is not recommended for use. Default mode is CBC.
535 | public static let ECBMode = Options(rawValue: RawValue(kCCOptionECBMode))
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:535:27: warning: static property 'ECBMode' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
522 | * Options for block ciphers
523 | */
524 | public struct Options : OptionSet {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
525 | public typealias RawValue = CCOptions
526 | public let rawValue: RawValue
:
533 | public static let PKCS7Padding = Options(rawValue: RawValue(kCCOptionPKCS7Padding))
534 | /// Electronic Code Book Mode. This block cipher mode is not recommended for use. Default mode is CBC.
535 | public static let ECBMode = Options(rawValue: RawValue(kCCOptionECBMode))
| |- warning: static property 'ECBMode' is not concurrency-safe because non-'Sendable' type 'Cipher.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ECBMode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
536 | }
537 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:269:48: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
267 | digest.update(self.bytesArray())
268 | let messageDigest = digest.final()
269 | return type(of: self).init(Data(bytes: UnsafePointer<UInt8>(messageDigest), count: messageDigest.count))
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
270 | }
271 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:288:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
286 | digest.update(self.data(using: String.Encoding.utf8)!.bytesArray())
287 | let messageDigest = digest.final()
288 | return Data(bytes: UnsafePointer<UInt8>(messageDigest), count: messageDigest.count).hexString()
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
289 | }
290 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:329:32: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
327 | static func random(_ length : Int) throws -> Data {
328 | let bytes = try Random.generateBytes(length)
329 | let data = Data(bytes: UnsafePointer<UInt8>(bytes), count: bytes.count)
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
330 | return data
331 | }
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:433:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
431 | hmac.update(self.bytesArray())
432 | let result = hmac.final()
433 | return Data(bytes: UnsafePointer<UInt8>(result), count: result.count)
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
434 | }
435 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:589:45: warning: initialization of 'UnsafeRawPointer' results in a dangling pointer
587 | var dataOutMoved = 0
588 | var outData = [UInt8](repeating: UInt8(0), count: Int(data.count + self.algorithm.blockSize))
589 | let ivData = self.iv == nil ? nil : UnsafeRawPointer(self.iv!)
| | |- note: implicit argument conversion from 'Cipher.IV' (aka 'Array<UInt8>') to 'UnsafeRawPointer' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafeRawPointer' results in a dangling pointer
590 | let status = CCCrypt(operation.rawValue, // operation
591 | self.algorithm.rawValue, // algorithm
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:628:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
626 | let cipher = Cipher(algorithm: algorithm, options: options, iv: iv?.bytesArray())
627 | let encryptedBytes = try cipher.encrypt(self.bytesArray(), key: key.bytesArray())
628 | return Data(bytes: UnsafePointer<UInt8>(encryptedBytes), count: encryptedBytes.count)
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
629 | }
630 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:646:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
644 | let cipher = Cipher(algorithm: algorithm, options: options, iv: iv?.bytesArray())
645 | let decryptedBytes = try cipher.decrypt(self.bytesArray(), key: key.bytesArray())
646 | return Data(bytes: UnsafePointer<UInt8>(decryptedBytes), count: decryptedBytes.count)
| | |- note: implicit argument conversion from '[UInt8]' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
647 | }
648 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:744:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
742 | func derivedKey(_ salt: Data, pseudoRandomAlgorithm: PBKDF.PseudoRandomAlgorithm, rounds: UInt32, derivedKeyLength: Int) throws -> Data {
743 | let key = try PBKDF.derivedKey(withLength: derivedKeyLength, password: self.bytesArray(), salt: salt.bytesArray(), pseudoRandomAlgorithm: pseudoRandomAlgorithm, rounds: rounds)
744 | return Data(bytes: UnsafePointer<UInt8>(key), count: key.count)
| | |- note: implicit argument conversion from 'PBKDF.DerivedKey' (aka 'Array<UInt8>') to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
745 | }
746 |
/Users/admin/builder/spi-builder-workspace/Source/SCrypto.swift:16:35: warning: forming 'UnsafeMutableRawPointer' to a variable of type '[T]'; this is likely incorrect because 'T' may contain an object reference.
14 | func bytesArray<T: ExpressibleByIntegerLiteral>() -> [T] {
15 | var bytes = Array<T>(repeating: 0, count: self.count)
16 | (self as NSData).getBytes(&bytes, length:self.count * MemoryLayout<T>.size)
| `- warning: forming 'UnsafeMutableRawPointer' to a variable of type '[T]'; this is likely incorrect because 'T' may contain an object reference.
17 | return bytes
18 | }
[4/6] Write Objects.LinkFileList
[5/6] Linking libSCrypto.dylib
Build complete! (5.51s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "SCrypto",
"name" : "SCrypto",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.11"
},
{
"name" : "ios",
"version" : "9.0"
}
],
"products" : [
{
"name" : "SCrypto",
"targets" : [
"SCrypto"
],
"type" : {
"library" : [
"dynamic"
]
}
}
],
"targets" : [
{
"c99name" : "SCrypto_Tests",
"module_type" : "SwiftTarget",
"name" : "SCrypto Tests",
"path" : "Tests",
"sources" : [
"SCryptoTests.swift"
],
"target_dependencies" : [
"SCrypto"
],
"type" : "test"
},
{
"c99name" : "SCrypto",
"module_type" : "SwiftTarget",
"name" : "SCrypto",
"path" : "Source",
"product_memberships" : [
"SCrypto"
],
"sources" : [
"SCrypto.swift"
],
"type" : "library"
}
],
"tools_version" : "5.1"
}
Done.