Build Information
Failed to build Replacer with Swift 6.0 for macOS (SPM).
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/tattn/Replacer.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/tattn/Replacer
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 2d6199d Merge pull request #5 from tattn/dependabot/bundler/tzinfo-1.2.10
Cloned https://github.com/tattn/Replacer.git
Revision (git rev-parse @):
2d6199d8e5200fa18a654ce0b111fdf976f34d8d
SUCCESS checkout https://github.com/tattn/Replacer.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/tattn/Replacer.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-6F35C1178C84523A.txt
[4/9] Compiling Replacer URLSessionConfiguration+.swift
[5/9] Compiling Replacer URLStub.swift
[6/9] Compiling Replacer URLStubProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
14 |
15 | fileprivate var stubs: [URLStub] = []
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:24:36: warning: capture of 'stub' with non-sendable type 'URLStub' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 | let stub = URLStubManager.shared.findStub(by: request)!
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
24 | if let responseBlock = stub._responseBlock {
| `- warning: capture of 'stub' with non-sendable type 'URLStub' in a `@Sendable` closure; this is an error in the Swift 6 language mode
25 | (stub._data, stub._error) = responseBlock(self.request)
26 | stub._responseBlock = nil
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStub.swift:11:14: note: class 'URLStub' does not conform to the 'Sendable' protocol
9 | import Foundation
10 |
11 | public class URLStub {
| `- note: class 'URLStub' does not conform to the 'Sendable' protocol
12 | var _url: String = ""
13 | var _method: HTTPMethod = .get
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubProtocol.swift:25:59: warning: capture of 'self' with non-sendable type 'URLStubProtocol' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class URLStubProtocol: URLProtocol {
| `- note: class 'URLStubProtocol' does not conform to the 'Sendable' protocol
12 |
13 | override open class func canInit(with request: URLRequest) -> Bool {
:
23 | DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + stub._delay) {
24 | if let responseBlock = stub._responseBlock {
25 | (stub._data, stub._error) = responseBlock(self.request)
| `- warning: capture of 'self' with non-sendable type 'URLStubProtocol' in a `@Sendable` closure; this is an error in the Swift 6 language mode
26 | stub._responseBlock = nil
27 | }
[7/9] Compiling Replacer URLStubManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
14 |
15 | fileprivate var stubs: [URLStub] = []
[8/9] Emitting module Replacer
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
14 |
15 | fileprivate var stubs: [URLStub] = []
[9/9] Compiling Replacer Replacer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
14 |
15 | fileprivate var stubs: [URLStub] = []
error: emit-module command failed with exit code 1 (use -v to see invocation)
[10/11] Emitting module TestReplacer
/Users/admin/builder/spi-builder-workspace/Sources/TestReplacer/XCTest+.swift:16:78: error: ambiguous use of 'tearDown'
14 |
15 | private static let swizzleTearDown: Void = {
16 | let tearDown = class_getInstanceMethod(XCTest.self, #selector(XCTest.tearDown))!
| `- error: ambiguous use of 'tearDown'
17 | let replacerTearDown = class_getInstanceMethod(XCTest.self, #selector(XCTest.autoResetTearDown))!
18 | method_exchangeImplementations(tearDown, replacerTearDown)
XCTest.XCTest:18:15: note: found this candidate in module 'XCTest'
16 | open func setUpWithError() throws
17 | open func setUp()
18 | open func tearDown()
| `- note: found this candidate in module 'XCTest'
19 | open func tearDownWithError() throws
20 | open func tearDown(completion: @escaping ((any Error)?) -> Void)
| `- note: found this candidate in module 'XCTest'
21 | open func tearDown() async throws
22 | @available(swift, obsoleted: 3, renamed: "tearDown(completion:)")
[11/11] Compiling TestReplacer XCTest+.swift
/Users/admin/builder/spi-builder-workspace/Sources/TestReplacer/XCTest+.swift:16:78: error: ambiguous use of 'tearDown'
14 |
15 | private static let swizzleTearDown: Void = {
16 | let tearDown = class_getInstanceMethod(XCTest.self, #selector(XCTest.tearDown))!
| `- error: ambiguous use of 'tearDown'
17 | let replacerTearDown = class_getInstanceMethod(XCTest.self, #selector(XCTest.autoResetTearDown))!
18 | method_exchangeImplementations(tearDown, replacerTearDown)
XCTest.XCTest:18:15: note: found this candidate in module 'XCTest'
16 | open func setUpWithError() throws
17 | open func setUp()
18 | open func tearDown()
| `- note: found this candidate in module 'XCTest'
19 | open func tearDownWithError() throws
20 | open func tearDown(completion: @escaping ((any Error)?) -> Void)
| `- note: found this candidate in module 'XCTest'
21 | open func tearDown() async throws
22 | @available(swift, obsoleted: 3, renamed: "tearDown(completion:)")
/Users/admin/builder/spi-builder-workspace/Sources/Replacer/URLStubManager.swift:13:23: warning: class property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public final class URLStubManager {
| `- note: class 'URLStubManager' does not conform to the 'Sendable' protocol
12 |
13 | public static let shared = URLStubManager()
| |- warning: class property 'shared' is not concurrency-safe because non-'Sendable' type 'URLStubManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
14 |
15 | fileprivate var stubs: [URLStub] = []
Fetching https://github.com/Alamofire/Alamofire.git
[1/28780] Fetching alamofire
Fetched https://github.com/Alamofire/Alamofire.git from cache (8.62s)
Computing version for https://github.com/Alamofire/Alamofire.git
Computed https://github.com/Alamofire/Alamofire.git at 4.9.1 (0.69s)
Creating working copy for https://github.com/Alamofire/Alamofire.git
Working copy of https://github.com/Alamofire/Alamofire.git resolved at 4.9.1
BUILD FAILURE 6.0 macosSpm