Build Information
Failed to build WriteFreely, reference main (4919bb), with Swift 6.1 for Wasm on 28 May 2025 12:53:24 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/writefreely/writefreely-swift.git
Reference: main
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/writefreely/writefreely-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 4919bb1 Add collections-related test suite (#38)
Cloned https://github.com/writefreely/writefreely-swift.git
Revision (git rev-parse @):
4919bb1edcfceafe134fdac7e5c9d2e5b8a43cc8
SUCCESS checkout https://github.com/writefreely/writefreely-swift.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/writefreely/writefreely-swift.git
https://github.com/writefreely/writefreely-swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "WriteFreely",
"name" : "WriteFreely",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.13"
},
{
"name" : "ios",
"version" : "11.0"
}
],
"products" : [
{
"name" : "WriteFreely",
"targets" : [
"WriteFreely"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "WriteFreelyTests",
"module_type" : "SwiftTarget",
"name" : "WriteFreelyTests",
"path" : "Tests/WriteFreelyTests",
"resources" : [
{
"path" : "/host/spi-builder-workspace/Tests/WriteFreelyTests/Resources/error_collection_400.json",
"rule" : {
"process" : {
}
}
},
{
"path" : "/host/spi-builder-workspace/Tests/WriteFreelyTests/Resources/test_collection.json",
"rule" : {
"process" : {
}
}
},
{
"path" : "/host/spi-builder-workspace/Tests/WriteFreelyTests/Resources/test_delete_collection.json",
"rule" : {
"process" : {
}
}
}
],
"sources" : [
"TestUtils.swift",
"WriteFreelyClientCollectionTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"WriteFreely"
],
"type" : "test"
},
{
"c99name" : "WriteFreely",
"module_type" : "SwiftTarget",
"name" : "WriteFreely",
"path" : "Sources/WriteFreely",
"product_memberships" : [
"WriteFreely"
],
"sources" : [
"Extensions/JSONDecoder+Extension.swift",
"HelperCodingKeys.swift",
"WFClient+Templates.swift",
"WFClient.swift",
"WFCollection.swift",
"WFError.swift",
"WFPost.swift",
"WFUser.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -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 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling WriteFreely HelperCodingKeys.swift
[4/11] Compiling WriteFreely WFClient+Templates.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
7 | /// - request: The `URLRequest` for the `GET` request
8 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
9 | func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
10 | if request.httpMethod != "GET" {
11 | preconditionFailure("Expected GET request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
44 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
45 | func post(
46 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
47 | expecting statusCode: Int,
48 | completion: @escaping (Result<Data, WFError>) -> Void
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
82 | /// - request: The `URLRequest` for the `DELETE` request
83 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
84 | func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
85 | if request.httpMethod != "DELETE" {
86 | preconditionFailure("Expected DELETE request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
| `- error: cannot find type 'URLRequest' in scope
9 | }
10 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:20:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
18 | }
19 |
20 | guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
21 | if let response = response as? HTTPURLResponse {
22 | completion(.failure(WFError(rawValue: response.statusCode) ?? .invalidResponse))
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:60:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
58 | }
59 |
60 | guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == statusCode else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
61 | if let response = response as? HTTPURLResponse {
62 | completion(.failure(WFError(rawValue: response.statusCode) ?? .invalidResponse))
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:95:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
93 | }
94 |
95 | guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == 204 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
96 | if let response = response as? HTTPURLResponse {
97 | completion(.failure(WFError(rawValue: response.statusCode) ?? .invalidResponse))
[5/11] Compiling WriteFreely WFPost.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFPost.swift:113:16: warning: static property 'testPost' is not concurrency-safe because non-'Sendable' type 'WFPost' may have shared mutable state; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public struct WFPost {
| `- note: consider making struct 'WFPost' conform to the 'Sendable' protocol
4 | public var postId: String?
5 | public var slug: String?
:
111 |
112 | extension WFPost {
113 | static let testPost = WFPost(postId: nil,
| |- warning: static property 'testPost' is not concurrency-safe because non-'Sendable' type 'WFPost' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'testPost' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
114 | slug: nil,
115 | appearance: "norm",
[6/11] Compiling WriteFreely WFError.swift
[7/11] Compiling WriteFreely WFCollection.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFCollection.swift:70:16: warning: static property 'testCollection' is not concurrency-safe because non-'Sendable' type 'WFCollection' may have shared mutable state; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public struct WFCollection {
| `- note: consider making struct 'WFCollection' conform to the 'Sendable' protocol
4 | public var alias: String?
5 | public var title: String
:
68 |
69 | extension WFCollection {
70 | static let testCollection = WFCollection(alias: "new-blog",
| |- warning: static property 'testCollection' is not concurrency-safe because non-'Sendable' type 'WFCollection' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'testCollection' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
71 | title: "Test Blog",
72 | description: "",
[8/11] Compiling WriteFreely WFClient.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:7:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | /// Define requirements for `URLSession`s here for dependency-injection purposes (specifically, for testing).
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
9 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
| `- error: cannot find type 'URLRequest' in scope
9 | }
10 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:32:85: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
30 | /// - instanceURL: The URL for the WriteFreely instance to which we're connecting, including the protocol.
31 | /// - session: The URL session to use for connections; defaults to `URLSession.shared`.
32 | public init(for instanceURL: URL, with session: URLSessionProtocol = URLSession.shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
33 | decoder = JSONDecoder()
34 | decoder.dateDecodingStrategy = .iso8601WithPossibleFractionalSeconds
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:960:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
958 | // MARK: - Protocol conformance
959 |
960 | extension URLSession: URLSessionProtocol {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
961 | public func dataTask(
962 | with request: URLRequest,
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:969:1: error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
967 | }
968 |
969 | extension URLSessionDataTask: URLSessionDataTaskProtocol {}
| `- error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
970 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:73:23: error: cannot find 'URLRequest' in scope
71 | return
72 | }
73 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
74 |
75 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
44 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
45 | func post(
46 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
47 | expecting statusCode: Int,
48 | completion: @escaping (Result<Data, WFError>) -> Void
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:97:59: error: cannot infer type of closure parameter 'result' without a type annotation
95 | }
96 |
97 | post(with: request, expecting: 201) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
98 | guard let self = self else { return }
99 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:141:23: error: cannot find 'URLRequest' in scope
139 | return
140 | }
141 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
142 |
143 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
7 | /// - request: The `URLRequest` for the `GET` request
8 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
9 | func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
10 | if request.httpMethod != "GET" {
11 | preconditionFailure("Expected GET request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:146:42: error: cannot infer type of closure parameter 'result' without a type annotation
144 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
145 |
146 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
147 | guard let self = self else { return }
148 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:189:23: error: cannot find 'URLRequest' in scope
187 | return
188 | }
189 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
190 |
191 | request.httpMethod = "DELETE"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
82 | /// - request: The `URLRequest` for the `DELETE` request
83 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
84 | func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
85 | if request.httpMethod != "DELETE" {
86 | preconditionFailure("Expected DELETE request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:245:23: error: cannot find 'URLRequest' in scope
243 | return
244 | }
245 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
246 |
247 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:250:42: error: cannot infer type of closure parameter 'result' without a type annotation
248 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
249 |
250 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
251 | guard let self = self else { return }
252 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:318:23: error: cannot find 'URLRequest' in scope
316 | return
317 | }
318 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
319 |
320 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:379:23: error: cannot find 'URLRequest' in scope
377 | return
378 | }
379 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
380 |
381 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:446:23: error: cannot find 'URLRequest' in scope
444 | return
445 | }
446 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
447 |
448 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:510:23: error: cannot find 'URLRequest' in scope
508 | return
509 | }
510 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
511 |
512 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:538:64: error: cannot infer type of closure parameter 'result' without a type annotation
536 | }
537 |
538 | self.post(with: request, expecting: 201) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
539 | guard let self = self else { return }
540 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:581:23: error: cannot find 'URLRequest' in scope
579 | return
580 | }
581 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
582 |
583 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:586:42: error: cannot infer type of closure parameter 'result' without a type annotation
584 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
585 |
586 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
587 | guard let self = self else { return }
588 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:634:23: error: cannot find 'URLRequest' in scope
632 | return
633 | }
634 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
635 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
636 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:638:42: error: cannot infer type of closure parameter 'result' without a type annotation
636 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
637 |
638 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
639 | guard let self = self else { return }
640 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:688:23: error: cannot find 'URLRequest' in scope
686 | return
687 | }
688 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
689 |
690 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:708:59: error: cannot infer type of closure parameter 'result' without a type annotation
706 | }
707 |
708 | post(with: request, expecting: 200) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
709 | guard let self = self else { return }
710 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:754:23: error: cannot find 'URLRequest' in scope
752 | return
753 | }
754 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
755 |
756 | request.httpMethod = "DELETE"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:796:23: error: cannot find 'URLRequest' in scope
794 | return
795 | }
796 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
797 |
798 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:812:59: error: cannot infer type of closure parameter 'result' without a type annotation
810 | }
811 |
812 | post(with: request, expecting: 200) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
813 | guard let self = self else { return }
814 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:850:23: error: cannot find 'URLRequest' in scope
848 | return
849 | }
850 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
851 |
852 | request.httpMethod = "DELETE"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:856:45: error: cannot infer type of closure parameter 'result' without a type annotation
854 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
855 |
856 | delete(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
857 | guard let self = self else { return }
858 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:889:23: error: cannot find 'URLRequest' in scope
887 | return
888 | }
889 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
890 |
891 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:924:23: error: cannot find 'URLRequest' in scope
922 | return
923 | }
924 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
925 |
926 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:929:42: error: cannot infer type of closure parameter 'result' without a type annotation
927 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
928 |
929 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
930 | guard let self = self else { return }
931 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:962:23: error: cannot find type 'URLRequest' in scope
960 | extension URLSession: URLSessionProtocol {
961 | public func dataTask(
962 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
963 | completionHandler: @escaping DataTaskResult
964 | ) -> URLSessionDataTaskProtocol {
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:963:38: error: cannot find type 'DataTaskResult' in scope
961 | public func dataTask(
962 | with request: URLRequest,
963 | completionHandler: @escaping DataTaskResult
| `- error: cannot find type 'DataTaskResult' in scope
964 | ) -> URLSessionDataTaskProtocol {
965 | return dataTask(with: request, completionHandler: completionHandler) as URLSessionDataTask
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:963:28: error: @escaping attribute only applies to function types
961 | public func dataTask(
962 | with request: URLRequest,
963 | completionHandler: @escaping DataTaskResult
| `- error: @escaping attribute only applies to function types
964 | ) -> URLSessionDataTaskProtocol {
965 | return dataTask(with: request, completionHandler: completionHandler) as URLSessionDataTask
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/11] Compiling WriteFreely JSONDecoder+Extension.swift
[10/11] Emitting module WriteFreely
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
7 | /// - request: The `URLRequest` for the `GET` request
8 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
9 | func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
10 | if request.httpMethod != "GET" {
11 | preconditionFailure("Expected GET request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
44 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
45 | func post(
46 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
47 | expecting statusCode: Int,
48 | completion: @escaping (Result<Data, WFError>) -> Void
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
82 | /// - request: The `URLRequest` for the `DELETE` request
83 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
84 | func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
85 | if request.httpMethod != "DELETE" {
86 | preconditionFailure("Expected DELETE request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:7:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | /// Define requirements for `URLSession`s here for dependency-injection purposes (specifically, for testing).
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
9 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
| `- error: cannot find type 'URLRequest' in scope
9 | }
10 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:32:85: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
30 | /// - instanceURL: The URL for the WriteFreely instance to which we're connecting, including the protocol.
31 | /// - session: The URL session to use for connections; defaults to `URLSession.shared`.
32 | public init(for instanceURL: URL, with session: URLSessionProtocol = URLSession.shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
33 | decoder = JSONDecoder()
34 | decoder.dateDecodingStrategy = .iso8601WithPossibleFractionalSeconds
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:960:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
958 | // MARK: - Protocol conformance
959 |
960 | extension URLSession: URLSessionProtocol {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
961 | public func dataTask(
962 | with request: URLRequest,
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:969:1: error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
967 | }
968 |
969 | extension URLSessionDataTask: URLSessionDataTaskProtocol {}
| `- error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
970 |
/host/spi-builder-workspace/Sources/WriteFreely/WFCollection.swift:70:16: warning: static property 'testCollection' is not concurrency-safe because non-'Sendable' type 'WFCollection' may have shared mutable state; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public struct WFCollection {
| `- note: consider making struct 'WFCollection' conform to the 'Sendable' protocol
4 | public var alias: String?
5 | public var title: String
:
68 |
69 | extension WFCollection {
70 | static let testCollection = WFCollection(alias: "new-blog",
| |- warning: static property 'testCollection' is not concurrency-safe because non-'Sendable' type 'WFCollection' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'testCollection' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
71 | title: "Test Blog",
72 | description: "",
/host/spi-builder-workspace/Sources/WriteFreely/WFPost.swift:113:16: warning: static property 'testPost' is not concurrency-safe because non-'Sendable' type 'WFPost' may have shared mutable state; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public struct WFPost {
| `- note: consider making struct 'WFPost' conform to the 'Sendable' protocol
4 | public var postId: String?
5 | public var slug: String?
:
111 |
112 | extension WFPost {
113 | static let testPost = WFPost(postId: nil,
| |- warning: static property 'testPost' is not concurrency-safe because non-'Sendable' type 'WFPost' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'testPost' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
114 | slug: nil,
115 | appearance: "norm",
/host/spi-builder-workspace/Sources/WriteFreely/WFUser.swift:59:16: warning: static property 'testUser' is not concurrency-safe because non-'Sendable' type 'WFUser' may have shared mutable state; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public struct WFUser {
| `- note: consider making struct 'WFUser' conform to the 'Sendable' protocol
4 | public var token: String
5 | public var username: String?
:
57 |
58 | extension WFUser {
59 | static let testUser = WFUser(token: "00000000-0000-0000-0000-000000000000",
| |- warning: static property 'testUser' is not concurrency-safe because non-'Sendable' type 'WFUser' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'testUser' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 | username: "matt",
61 | email: "matt@example.com",
[11/11] Compiling WriteFreely WFUser.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFUser.swift:59:16: warning: static property 'testUser' is not concurrency-safe because non-'Sendable' type 'WFUser' may have shared mutable state; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public struct WFUser {
| `- note: consider making struct 'WFUser' conform to the 'Sendable' protocol
4 | public var token: String
5 | public var username: String?
:
57 |
58 | extension WFUser {
59 | static let testUser = WFUser(token: "00000000-0000-0000-0000-000000000000",
| |- warning: static property 'testUser' is not concurrency-safe because non-'Sendable' type 'WFUser' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'testUser' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
60 | username: "matt",
61 | email: "matt@example.com",
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] Compiling WriteFreely JSONDecoder+Extension.swift
[3/9] Compiling WriteFreely HelperCodingKeys.swift
[4/9] Compiling WriteFreely WFClient+Templates.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
7 | /// - request: The `URLRequest` for the `GET` request
8 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
9 | func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
10 | if request.httpMethod != "GET" {
11 | preconditionFailure("Expected GET request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
44 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
45 | func post(
46 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
47 | expecting statusCode: Int,
48 | completion: @escaping (Result<Data, WFError>) -> Void
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
82 | /// - request: The `URLRequest` for the `DELETE` request
83 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
84 | func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
85 | if request.httpMethod != "DELETE" {
86 | preconditionFailure("Expected DELETE request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
| `- error: cannot find type 'URLRequest' in scope
9 | }
10 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:20:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
18 | }
19 |
20 | guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
21 | if let response = response as? HTTPURLResponse {
22 | completion(.failure(WFError(rawValue: response.statusCode) ?? .invalidResponse))
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:60:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
58 | }
59 |
60 | guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == statusCode else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
61 | if let response = response as? HTTPURLResponse {
62 | completion(.failure(WFError(rawValue: response.statusCode) ?? .invalidResponse))
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:95:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
93 | }
94 |
95 | guard let unwrappedResponse = response as? HTTPURLResponse, unwrappedResponse.statusCode == 204 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
96 | if let response = response as? HTTPURLResponse {
97 | completion(.failure(WFError(rawValue: response.statusCode) ?? .invalidResponse))
[5/10] Compiling WriteFreely WFCollection.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/10] Compiling WriteFreely WFError.swift
[7/10] Compiling WriteFreely WFPost.swift
[8/10] Emitting module WriteFreely
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
7 | /// - request: The `URLRequest` for the `GET` request
8 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
9 | func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
10 | if request.httpMethod != "GET" {
11 | preconditionFailure("Expected GET request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
44 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
45 | func post(
46 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
47 | expecting statusCode: Int,
48 | completion: @escaping (Result<Data, WFError>) -> Void
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
82 | /// - request: The `URLRequest` for the `DELETE` request
83 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
84 | func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
85 | if request.httpMethod != "DELETE" {
86 | preconditionFailure("Expected DELETE request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:7:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | /// Define requirements for `URLSession`s here for dependency-injection purposes (specifically, for testing).
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
9 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
| `- error: cannot find type 'URLRequest' in scope
9 | }
10 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:32:85: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
30 | /// - instanceURL: The URL for the WriteFreely instance to which we're connecting, including the protocol.
31 | /// - session: The URL session to use for connections; defaults to `URLSession.shared`.
32 | public init(for instanceURL: URL, with session: URLSessionProtocol = URLSession.shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
33 | decoder = JSONDecoder()
34 | decoder.dateDecodingStrategy = .iso8601WithPossibleFractionalSeconds
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:960:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
958 | // MARK: - Protocol conformance
959 |
960 | extension URLSession: URLSessionProtocol {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
961 | public func dataTask(
962 | with request: URLRequest,
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:969:1: error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
967 | }
968 |
969 | extension URLSessionDataTask: URLSessionDataTaskProtocol {}
| `- error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
970 |
[9/10] Compiling WriteFreely WFClient.swift
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:7:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
5 | /// Define requirements for `URLSession`s here for dependency-injection purposes (specifically, for testing).
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
9 | }
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:8:33: error: cannot find type 'URLRequest' in scope
6 | public protocol URLSessionProtocol {
7 | typealias DataTaskResult = (Data?, URLResponse?, Error?) -> Void
8 | func dataTask(with request: URLRequest, completionHandler: @escaping DataTaskResult) -> URLSessionDataTaskProtocol
| `- error: cannot find type 'URLRequest' in scope
9 | }
10 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:32:85: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
30 | /// - instanceURL: The URL for the WriteFreely instance to which we're connecting, including the protocol.
31 | /// - session: The URL session to use for connections; defaults to `URLSession.shared`.
32 | public init(for instanceURL: URL, with session: URLSessionProtocol = URLSession.shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
33 | decoder = JSONDecoder()
34 | decoder.dateDecodingStrategy = .iso8601WithPossibleFractionalSeconds
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:960:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
958 | // MARK: - Protocol conformance
959 |
960 | extension URLSession: URLSessionProtocol {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
961 | public func dataTask(
962 | with request: URLRequest,
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:969:1: error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
967 | }
968 |
969 | extension URLSessionDataTask: URLSessionDataTaskProtocol {}
| `- error: non-nominal type 'URLSessionDataTask' (aka 'AnyObject') cannot be extended
970 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:73:23: error: cannot find 'URLRequest' in scope
71 | return
72 | }
73 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
74 |
75 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:46:23: error: cannot find type 'URLRequest' in scope
44 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
45 | func post(
46 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
47 | expecting statusCode: Int,
48 | completion: @escaping (Result<Data, WFError>) -> Void
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:97:59: error: cannot infer type of closure parameter 'result' without a type annotation
95 | }
96 |
97 | post(with: request, expecting: 201) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
98 | guard let self = self else { return }
99 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:141:23: error: cannot find 'URLRequest' in scope
139 | return
140 | }
141 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
142 |
143 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:9:28: error: cannot find type 'URLRequest' in scope
7 | /// - request: The `URLRequest` for the `GET` request
8 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
9 | func get(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
10 | if request.httpMethod != "GET" {
11 | preconditionFailure("Expected GET request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:146:42: error: cannot infer type of closure parameter 'result' without a type annotation
144 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
145 |
146 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
147 | guard let self = self else { return }
148 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:189:23: error: cannot find 'URLRequest' in scope
187 | return
188 | }
189 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
190 |
191 | request.httpMethod = "DELETE"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient+Templates.swift:84:31: error: cannot find type 'URLRequest' in scope
82 | /// - request: The `URLRequest` for the `DELETE` request
83 | /// - completion: A closure that captures a `Result` with a `Data` object on success, or a `WFError` on failure.
84 | func delete(with request: URLRequest, completion: @escaping (Result<Data, WFError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
85 | if request.httpMethod != "DELETE" {
86 | preconditionFailure("Expected DELETE request, but got \(request.httpMethod ?? "nil")")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:245:23: error: cannot find 'URLRequest' in scope
243 | return
244 | }
245 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
246 |
247 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:250:42: error: cannot infer type of closure parameter 'result' without a type annotation
248 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
249 |
250 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
251 | guard let self = self else { return }
252 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:318:23: error: cannot find 'URLRequest' in scope
316 | return
317 | }
318 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
319 |
320 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:379:23: error: cannot find 'URLRequest' in scope
377 | return
378 | }
379 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
380 |
381 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:446:23: error: cannot find 'URLRequest' in scope
444 | return
445 | }
446 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
447 |
448 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:510:23: error: cannot find 'URLRequest' in scope
508 | return
509 | }
510 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
511 |
512 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:538:64: error: cannot infer type of closure parameter 'result' without a type annotation
536 | }
537 |
538 | self.post(with: request, expecting: 201) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
539 | guard let self = self else { return }
540 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:581:23: error: cannot find 'URLRequest' in scope
579 | return
580 | }
581 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
582 |
583 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:586:42: error: cannot infer type of closure parameter 'result' without a type annotation
584 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
585 |
586 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
587 | guard let self = self else { return }
588 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:634:23: error: cannot find 'URLRequest' in scope
632 | return
633 | }
634 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
635 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
636 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:638:42: error: cannot infer type of closure parameter 'result' without a type annotation
636 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
637 |
638 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
639 | guard let self = self else { return }
640 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:688:23: error: cannot find 'URLRequest' in scope
686 | return
687 | }
688 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
689 |
690 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:708:59: error: cannot infer type of closure parameter 'result' without a type annotation
706 | }
707 |
708 | post(with: request, expecting: 200) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
709 | guard let self = self else { return }
710 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:754:23: error: cannot find 'URLRequest' in scope
752 | return
753 | }
754 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
755 |
756 | request.httpMethod = "DELETE"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:796:23: error: cannot find 'URLRequest' in scope
794 | return
795 | }
796 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
797 |
798 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:812:59: error: cannot infer type of closure parameter 'result' without a type annotation
810 | }
811 |
812 | post(with: request, expecting: 200) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
813 | guard let self = self else { return }
814 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:850:23: error: cannot find 'URLRequest' in scope
848 | return
849 | }
850 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
851 |
852 | request.httpMethod = "DELETE"
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:856:45: error: cannot infer type of closure parameter 'result' without a type annotation
854 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
855 |
856 | delete(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
857 | guard let self = self else { return }
858 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:889:23: error: cannot find 'URLRequest' in scope
887 | return
888 | }
889 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
890 |
891 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:924:23: error: cannot find 'URLRequest' in scope
922 | return
923 | }
924 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
925 |
926 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:929:42: error: cannot infer type of closure parameter 'result' without a type annotation
927 | request.addValue(tokenToVerify, forHTTPHeaderField: "Authorization")
928 |
929 | get(with: request) { [weak self] result in
| `- error: cannot infer type of closure parameter 'result' without a type annotation
930 | guard let self = self else { return }
931 |
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:962:23: error: cannot find type 'URLRequest' in scope
960 | extension URLSession: URLSessionProtocol {
961 | public func dataTask(
962 | with request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
963 | completionHandler: @escaping DataTaskResult
964 | ) -> URLSessionDataTaskProtocol {
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:963:38: error: cannot find type 'DataTaskResult' in scope
961 | public func dataTask(
962 | with request: URLRequest,
963 | completionHandler: @escaping DataTaskResult
| `- error: cannot find type 'DataTaskResult' in scope
964 | ) -> URLSessionDataTaskProtocol {
965 | return dataTask(with: request, completionHandler: completionHandler) as URLSessionDataTask
/host/spi-builder-workspace/Sources/WriteFreely/WFClient.swift:963:28: error: @escaping attribute only applies to function types
961 | public func dataTask(
962 | with request: URLRequest,
963 | completionHandler: @escaping DataTaskResult
| `- error: @escaping attribute only applies to function types
964 | ) -> URLSessionDataTaskProtocol {
965 | return dataTask(with: request, completionHandler: completionHandler) as URLSessionDataTask
[10/10] Compiling WriteFreely WFUser.swift
BUILD FAILURE 6.1 wasm