Build Information
Failed to build SwiftStack, reference 0.6.0 (3ed8ed
), with Swift 6.1 for Android on 27 May 2025 19:15:29 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
Build Log
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
554 |
555 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:553:145: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
551 | queue.async {
552 | do {
553 | let response: APIResponse<Question> = try self.fetchRelatedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
554 |
555 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:555:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
553 | let response: APIResponse<Question> = try self.fetchRelatedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
554 |
555 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
556 | } catch {
557 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:659:68: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
657 | queue.async {
658 | do {
659 | let response: APIResponse<Question.Timeline> = try self.fetchTimelineOf(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
660 |
661 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:659:146: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
657 | queue.async {
658 | do {
659 | let response: APIResponse<Question.Timeline> = try self.fetchTimelineOf(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
660 |
661 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:661:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question.Timeline>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
659 | let response: APIResponse<Question.Timeline> = try self.fetchTimelineOf(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
660 |
661 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question.Timeline>?, (any Error)?) -> ()' 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'
662 | } catch {
663 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:753:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
751 | queue.async {
752 | do {
753 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
754 | parameters: parameters,
755 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:755:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
753 | let response: APIResponse<Question> = try self.fetchQuestions(
754 | parameters: parameters,
755 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
756 | )
757 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:758:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
756 | )
757 |
758 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
759 | } catch {
760 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:812:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
810 | queue.async {
811 | do {
812 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
813 | parameters: parameters,
814 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:814:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
812 | let response: APIResponse<Question> = try self.fetchQuestions(
813 | parameters: parameters,
814 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
815 | )
816 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:817:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
815 | )
816 |
817 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
818 | } catch {
819 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:871:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
869 | queue.async {
870 | do {
871 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
872 | parameters: parameters,
873 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:873:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
871 | let response: APIResponse<Question> = try self.fetchQuestions(
872 | parameters: parameters,
873 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
874 | )
875 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:876:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
874 | )
875 |
876 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
877 | } catch {
878 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[21/27] Compiling SwiftStack RequestsQuestions.swift
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:58:57: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
56 | queue.async {
57 | do {
58 | let response: APIResponse<Answer> = try self.fetchAnswers(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
59 | parameters: parameters,
60 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:60:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
58 | let response: APIResponse<Answer> = try self.fetchAnswers(
59 | parameters: parameters,
60 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
61 | )
62 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:63:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Answer>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
61 | )
62 |
63 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Answer>?, (any Error)?) -> ()' 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'
64 | } catch {
65 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:123:57: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
121 | queue.async {
122 | do {
123 | let response: APIResponse<Answer> = try self.fetchAnswers(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
124 | ids,
125 | parameters: parameters,
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:126:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
124 | ids,
125 | parameters: parameters,
126 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
127 | )
128 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:129:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Answer>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
127 | )
128 |
129 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Answer>?, (any Error)?) -> ()' 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'
130 | } catch {
131 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:234:58: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
232 | queue.async {
233 | do {
234 | let response: APIResponse<Comment> = try self.fetchCommentsOn(answers: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
235 |
236 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:234:134: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
232 | queue.async {
233 | do {
234 | let response: APIResponse<Comment> = try self.fetchCommentsOn(answers: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
235 |
236 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:236:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Comment>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
234 | let response: APIResponse<Comment> = try self.fetchCommentsOn(answers: ids, parameters: parameters, backoffBehavior: backoffBehavior)
235 |
236 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Comment>?, (any Error)?) -> ()' 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'
237 | } catch {
238 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:341:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
339 | queue.async {
340 | do {
341 | let response: APIResponse<Question> = try self.fetchQuestionsOfAnswers(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
342 | ids,
343 | parameters: parameters,
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:344:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
342 | ids,
343 | parameters: parameters,
344 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
345 | )
346 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsAnswers.swift:347:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
345 | )
346 |
347 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
348 | } catch {
349 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsPrivileges.swift:61:60: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
59 | queue.async {
60 | do {
61 | let response: APIResponse<Privilege> = try self.fetchPrivileges(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
62 | parameters: parameters,
63 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsPrivileges.swift:63:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
61 | let response: APIResponse<Privilege> = try self.fetchPrivileges(
62 | parameters: parameters,
63 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
64 | )
65 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsPrivileges.swift:66:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Privilege>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
64 | )
65 |
66 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Privilege>?, (any Error)?) -> ()' 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'
67 | } catch {
68 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:59:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
57 | queue.async {
58 | do {
59 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
60 | parameters: parameters,
61 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:61:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
59 | let response: APIResponse<Question> = try self.fetchQuestions(
60 | parameters: parameters,
61 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
62 | )
63 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:64:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
62 | )
63 |
64 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
65 | } catch {
66 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:124:47: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
122 | queue.async {
123 | do {
124 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
125 | ids,
126 | parameters: parameters,
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:127:23: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
125 | ids,
126 | parameters: parameters,
127 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | )
129 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:130:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | )
129 |
130 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
131 | } catch {
132 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:235:57: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
233 | queue.async {
234 | do {
235 | let response: APIResponse<Answer> = try self.fetchAnswersOn(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
236 |
237 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:235:134: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
233 | queue.async {
234 | do {
235 | let response: APIResponse<Answer> = try self.fetchAnswersOn(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
236 |
237 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:237:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Answer>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
235 | let response: APIResponse<Answer> = try self.fetchAnswersOn(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
236 |
237 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Answer>?, (any Error)?) -> ()' 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'
238 | } catch {
239 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:341:58: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
339 | queue.async {
340 | do {
341 | let response: APIResponse<Comment> = try self.fetchCommentsOn(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
342 |
343 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:341:136: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
339 | queue.async {
340 | do {
341 | let response: APIResponse<Comment> = try self.fetchCommentsOn(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
342 |
343 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:343:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Comment>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
341 | let response: APIResponse<Comment> = try self.fetchCommentsOn(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
342 |
343 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Comment>?, (any Error)?) -> ()' 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'
344 | } catch {
345 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:447:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
445 | queue.async {
446 | do {
447 | let response: APIResponse<Question> = try self.fetchLinkedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
448 |
449 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:447:144: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
445 | queue.async {
446 | do {
447 | let response: APIResponse<Question> = try self.fetchLinkedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
448 |
449 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:449:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
447 | let response: APIResponse<Question> = try self.fetchLinkedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
448 |
449 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
450 | } catch {
451 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:553:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
551 | queue.async {
552 | do {
553 | let response: APIResponse<Question> = try self.fetchRelatedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
554 |
555 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:553:145: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
551 | queue.async {
552 | do {
553 | let response: APIResponse<Question> = try self.fetchRelatedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
554 |
555 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:555:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
553 | let response: APIResponse<Question> = try self.fetchRelatedQuestionsTo(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
554 |
555 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
556 | } catch {
557 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:659:68: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
657 | queue.async {
658 | do {
659 | let response: APIResponse<Question.Timeline> = try self.fetchTimelineOf(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
660 |
661 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:659:146: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
657 | queue.async {
658 | do {
659 | let response: APIResponse<Question.Timeline> = try self.fetchTimelineOf(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
660 |
661 | completionHandler(response, nil)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:661:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question.Timeline>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
659 | let response: APIResponse<Question.Timeline> = try self.fetchTimelineOf(questions: ids, parameters: parameters, backoffBehavior: backoffBehavior)
660 |
661 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question.Timeline>?, (any Error)?) -> ()' 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'
662 | } catch {
663 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:753:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
751 | queue.async {
752 | do {
753 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
754 | parameters: parameters,
755 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:755:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
753 | let response: APIResponse<Question> = try self.fetchQuestions(
754 | parameters: parameters,
755 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
756 | )
757 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:758:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
756 | )
757 |
758 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
759 | } catch {
760 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:812:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
810 | queue.async {
811 | do {
812 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
813 | parameters: parameters,
814 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:814:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
812 | let response: APIResponse<Question> = try self.fetchQuestions(
813 | parameters: parameters,
814 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
815 | )
816 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:817:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
815 | )
816 |
817 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
818 | } catch {
819 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:871:59: warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
869 | queue.async {
870 | do {
871 | let response: APIResponse<Question> = try self.fetchQuestions(
| `- warning: capture of 'self' with non-sendable type 'APIClient' in a '@Sendable' closure; this is an error in the Swift 6 language mode
872 | parameters: parameters,
873 | backoffBehavior: backoffBehavior
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:12: note: class 'APIClient' does not conform to the 'Sendable' protocol
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- note: class 'APIClient' does not conform to the 'Sendable' protocol
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:873:38: warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
871 | let response: APIResponse<Question> = try self.fetchQuestions(
872 | parameters: parameters,
873 | backoffBehavior: backoffBehavior
| `- warning: capture of 'backoffBehavior' with non-sendable type 'APIClient.BackoffBehavior' in a '@Sendable' closure; this is an error in the Swift 6 language mode
874 | )
875 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:92:14: note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
90 | }
91 |
92 | public enum BackoffBehavior {
| `- note: consider making enum 'BackoffBehavior' conform to the 'Sendable' protocol
93 | case wait
94 | case throwError
/host/spi-builder-workspace/Sources/SwiftStack/RequestsQuestions.swift:876:17: warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' in a '@Sendable' closure; this is an error in the Swift 6 language mode
874 | )
875 |
876 | completionHandler(response, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(APIResponse<Question>?, (any Error)?) -> ()' 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'
877 | } catch {
878 | completionHandler(nil, error)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[22/27] Compiling SwiftStack DictionaryConvertible.swift
[23/27] Compiling SwiftStack JsonConvertible.swift
[24/27] Compiling SwiftStack JsonHelper.swift
[25/27] Compiling SwiftStack StringRepresentable.swift
[26/27] Compiling SwiftStack SuggestedEdit.swift
[27/27] Compiling SwiftStack User.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/23] Emitting module SwiftStack
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:42:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 |
41 | ///The URLSession for this client.
42 | open var session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 |
44 | ///The queue used for asynchronous operations.
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:38: error: cannot find type 'URLRequest' in scope
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: cannot find type 'URLRequest' in scope
208 | let req = request
209 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | let req = request
209 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:240:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | ///- parameter url: The URL to send the request to.
239 | ///- returns: The data and response returned by the request.
240 | open func get(_ url: String) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
241 | guard let nsUrl = URL(string: url) else {
242 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:256:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | ///
255 | ///- returns: The data and response returned by the request.
256 | open func post(_ url: String, fields: [String:String]) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 | guard let nsUrl = URL(string: url) else {
258 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:305:38: error: cannot find type 'URLRequest' in scope
303 | ///- parameter request: The request to perform.
304 | ///- returns: The text returned by the request.
305 | open func performRequest(_ request: URLRequest) throws -> String {
| `- error: cannot find type 'URLRequest' in scope
306 | let (data, _) = try performRequest(request)
307 | guard let string = String(data: data, encoding: String.Encoding.utf8) else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:397:13: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
395 | //MARK: - Task management
396 | internal class HTTPTask {
397 | var task: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:398:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 | internal class HTTPTask {
397 | var task: URLSessionTask
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
399 |
400 | var request: URLRequest!
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:400:16: error: cannot find type 'URLRequest' in scope
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
400 | var request: URLRequest!
| `- error: cannot find type 'URLRequest' in scope
401 |
402 | var data: Data?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:403:17: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
401 |
402 | var data: Data?
403 | var response: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:39: error: cannot find type 'URLRequest' in scope
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
407 | self.task = task
408 | self.completion = completion
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:82: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:61: error: cannot find type 'URLRequest' in scope
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:36: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:104: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:433:44: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
434 |
435 | guard let task = tasks[dataTask] else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:430:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
428 | //MARK: - URLSession delegate methods
429 | public func urlSession(
430 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:431:13: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | public func urlSession(
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:432:24: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
434 |
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/SwiftStack/APIClient.swift:451:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:451:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:66: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:482:23: error: cannot find type 'URLRequest' in scope
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
483 | completionHandler: @escaping (URLRequest?) -> Void
484 | ) {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:483:33: error: cannot find type 'URLRequest' in scope
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
484 | ) {
485 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:479:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
477 |
478 | public func urlSession(
479 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:480:9: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
478 | public func urlSession(
479 | _ session: URLSession,
480 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:481:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
479 | _ session: URLSession,
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:33: error: cannot find type 'URLSessionDataDelegate' in scope
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
39 | //MARK: Instance variables and types.
40 |
[3/26] Compiling SwiftStack APIClient.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:42:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 |
41 | ///The URLSession for this client.
42 | open var session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 |
44 | ///The queue used for asynchronous operations.
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:38: error: cannot find type 'URLRequest' in scope
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: cannot find type 'URLRequest' in scope
208 | let req = request
209 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | let req = request
209 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:240:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | ///- parameter url: The URL to send the request to.
239 | ///- returns: The data and response returned by the request.
240 | open func get(_ url: String) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
241 | guard let nsUrl = URL(string: url) else {
242 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:256:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | ///
255 | ///- returns: The data and response returned by the request.
256 | open func post(_ url: String, fields: [String:String]) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 | guard let nsUrl = URL(string: url) else {
258 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:305:38: error: cannot find type 'URLRequest' in scope
303 | ///- parameter request: The request to perform.
304 | ///- returns: The text returned by the request.
305 | open func performRequest(_ request: URLRequest) throws -> String {
| `- error: cannot find type 'URLRequest' in scope
306 | let (data, _) = try performRequest(request)
307 | guard let string = String(data: data, encoding: String.Encoding.utf8) else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:397:13: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
395 | //MARK: - Task management
396 | internal class HTTPTask {
397 | var task: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:398:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 | internal class HTTPTask {
397 | var task: URLSessionTask
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
399 |
400 | var request: URLRequest!
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:400:16: error: cannot find type 'URLRequest' in scope
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
400 | var request: URLRequest!
| `- error: cannot find type 'URLRequest' in scope
401 |
402 | var data: Data?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:403:17: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
401 |
402 | var data: Data?
403 | var response: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:39: error: cannot find type 'URLRequest' in scope
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
407 | self.task = task
408 | self.completion = completion
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:82: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:61: error: cannot find type 'URLRequest' in scope
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:36: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:104: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:433:44: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
434 |
435 | guard let task = tasks[dataTask] else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:430:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
428 | //MARK: - URLSession delegate methods
429 | public func urlSession(
430 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:431:13: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | public func urlSession(
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:432:24: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
434 |
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/SwiftStack/APIClient.swift:451:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:451:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:66: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:482:23: error: cannot find type 'URLRequest' in scope
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
483 | completionHandler: @escaping (URLRequest?) -> Void
484 | ) {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:483:33: error: cannot find type 'URLRequest' in scope
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
484 | ) {
485 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:479:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
477 |
478 | public func urlSession(
479 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:480:9: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
478 | public func urlSession(
479 | _ session: URLSession,
480 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:481:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
479 | _ session: URLSession,
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:33: error: cannot find type 'URLSessionDataDelegate' in scope
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:212:13: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
210 | let sema = DispatchSemaphore(value: 0)
211 | var data: Data!
212 | var resp: URLResponse!
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | var error: Error!
214 |
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/SwiftStack/APIClient.swift:219:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
217 | //TODO: I don't think this needs to be on the client queue anymore
218 | queue.async {
219 | let task = self.session.dataTask(with: req)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
220 | self.performTask(task, request: req) {inData, inResp, inError in
221 | (data, resp, error) = (inData, inResp, inError)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:229:29: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
227 | sema.wait()
228 |
229 | guard let response = resp as? HTTPURLResponse, data != nil else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
230 | throw error
231 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:229:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 | sema.wait()
228 |
229 | guard let response = resp as? HTTPURLResponse, data != nil else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 | throw error
231 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:244:17: error: cannot find 'URLRequest' in scope
242 | throw RequestError.invalidURL(url: url)
243 | }
244 | var request = URLRequest(url: nsUrl)
| `- error: cannot find 'URLRequest' in scope
245 | request.setValue(String(request.httpBody?.count ?? 0), forHTTPHeaderField: "Content-Length")
246 | return try performRequest(request)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:263:17: error: cannot find 'URLRequest' in scope
261 | throw RequestError.notUTF8
262 | }
263 | var request = URLRequest(url: nsUrl)
| `- error: cannot find 'URLRequest' in scope
264 | request.httpMethod = "POST"
265 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:271:13: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |
270 | var responseData: Data?
271 | var resp: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | var responseError: Error?
273 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:275:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
273 |
274 | queue.async {
275 | let task = self.session.uploadTask(with: request, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
276 | self.performTask(task, request: request) {data, response, error in
277 | (responseData, resp, responseError) = (data, response, error)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:360:48: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
358 | super.init()
359 |
360 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
361 |
362 | if proxyAddress != nil {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:368:6: error: cannot find 'kCFNetworkProxiesHTTPProxy' in scope
366 | configuration.connectionProxyDictionary = [
367 | "HTTPEnable" : 1,
368 | kCFNetworkProxiesHTTPProxy as AnyHashable : proxyAddress!,
| `- error: cannot find 'kCFNetworkProxiesHTTPProxy' in scope
369 | kCFNetworkProxiesHTTPPort as AnyHashable : proxyPort,
370 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:369:6: error: cannot find 'kCFNetworkProxiesHTTPPort' in scope
367 | "HTTPEnable" : 1,
368 | kCFNetworkProxiesHTTPProxy as AnyHashable : proxyAddress!,
369 | kCFNetworkProxiesHTTPPort as AnyHashable : proxyPort,
| `- error: cannot find 'kCFNetworkProxiesHTTPPort' in scope
370 |
371 | "HTTPSEnable" : 1,
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:372:6: error: cannot find 'kCFNetworkProxiesHTTPSProxy' in scope
370 |
371 | "HTTPSEnable" : 1,
372 | kCFNetworkProxiesHTTPSProxy as AnyHashable : proxyAddress!,
| `- error: cannot find 'kCFNetworkProxiesHTTPSProxy' in scope
373 | kCFNetworkProxiesHTTPSPort as AnyHashable : proxyPort
374 | ]
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:373:6: error: cannot find 'kCFNetworkProxiesHTTPSPort' in scope
371 | "HTTPSEnable" : 1,
372 | kCFNetworkProxiesHTTPSProxy as AnyHashable : proxyAddress!,
373 | kCFNetworkProxiesHTTPSPort as AnyHashable : proxyPort
| `- error: cannot find 'kCFNetworkProxiesHTTPSPort' in scope
374 | ]
375 | #endif
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:384:13: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
382 | delegateQueue.maxConcurrentOperationCount = 1
383 |
384 | session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
385 | configuration: configuration,
386 | delegate: self, delegateQueue: delegateQueue
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:420:8: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
421 | }
422 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:437:23: error: cannot infer contextual base in reference to member 'cancel'
435 | guard let task = tasks[dataTask] else {
436 | print("\(dataTask) is not in client task list; cancelling")
437 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
438 | return
439 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:442:49: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
440 |
441 | var headers = [String:String]()
442 | for (k, v) in (response as? HTTPURLResponse)?.allHeaderFields ?? [:] {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
443 | headers[String(describing: k)] = String(describing: v)
444 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:442:65: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
440 |
441 | var headers = [String:String]()
442 | for (k, v) in (response as? HTTPURLResponse)?.allHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
443 | headers[String(describing: k)] = String(describing: v)
444 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:447:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
445 |
446 |
447 | task.response = response as? HTTPURLResponse
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
448 | completionHandler(.allow)
449 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:448:22: error: cannot infer contextual base in reference to member 'allow'
446 |
447 | task.response = response as? HTTPURLResponse
448 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
449 | }
450 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:487:26: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
485 |
486 | var headers = [String:String]()
487 | for (k, v) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
488 | headers[String(describing: k)] = String(describing: v)
489 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:497:11: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
495 |
496 | deinit {
497 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
498 | }
499 | }
[4/26] Compiling SwiftStack APIResponse.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:42:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 |
41 | ///The URLSession for this client.
42 | open var session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 |
44 | ///The queue used for asynchronous operations.
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:38: error: cannot find type 'URLRequest' in scope
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: cannot find type 'URLRequest' in scope
208 | let req = request
209 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | let req = request
209 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:240:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | ///- parameter url: The URL to send the request to.
239 | ///- returns: The data and response returned by the request.
240 | open func get(_ url: String) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
241 | guard let nsUrl = URL(string: url) else {
242 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:256:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | ///
255 | ///- returns: The data and response returned by the request.
256 | open func post(_ url: String, fields: [String:String]) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 | guard let nsUrl = URL(string: url) else {
258 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:305:38: error: cannot find type 'URLRequest' in scope
303 | ///- parameter request: The request to perform.
304 | ///- returns: The text returned by the request.
305 | open func performRequest(_ request: URLRequest) throws -> String {
| `- error: cannot find type 'URLRequest' in scope
306 | let (data, _) = try performRequest(request)
307 | guard let string = String(data: data, encoding: String.Encoding.utf8) else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:397:13: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
395 | //MARK: - Task management
396 | internal class HTTPTask {
397 | var task: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:398:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 | internal class HTTPTask {
397 | var task: URLSessionTask
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
399 |
400 | var request: URLRequest!
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:400:16: error: cannot find type 'URLRequest' in scope
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
400 | var request: URLRequest!
| `- error: cannot find type 'URLRequest' in scope
401 |
402 | var data: Data?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:403:17: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
401 |
402 | var data: Data?
403 | var response: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:39: error: cannot find type 'URLRequest' in scope
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
407 | self.task = task
408 | self.completion = completion
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:82: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:61: error: cannot find type 'URLRequest' in scope
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:36: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:104: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:433:44: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
434 |
435 | guard let task = tasks[dataTask] else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:430:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
428 | //MARK: - URLSession delegate methods
429 | public func urlSession(
430 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:431:13: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | public func urlSession(
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:432:24: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
434 |
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/SwiftStack/APIClient.swift:451:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:451:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:66: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:482:23: error: cannot find type 'URLRequest' in scope
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
483 | completionHandler: @escaping (URLRequest?) -> Void
484 | ) {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:483:33: error: cannot find type 'URLRequest' in scope
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
484 | ) {
485 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:479:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
477 |
478 | public func urlSession(
479 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:480:9: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
478 | public func urlSession(
479 | _ session: URLSession,
480 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:481:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
479 | _ session: URLSession,
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:33: error: cannot find type 'URLSessionDataDelegate' in scope
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:212:13: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
210 | let sema = DispatchSemaphore(value: 0)
211 | var data: Data!
212 | var resp: URLResponse!
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | var error: Error!
214 |
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/SwiftStack/APIClient.swift:219:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
217 | //TODO: I don't think this needs to be on the client queue anymore
218 | queue.async {
219 | let task = self.session.dataTask(with: req)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
220 | self.performTask(task, request: req) {inData, inResp, inError in
221 | (data, resp, error) = (inData, inResp, inError)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:229:29: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
227 | sema.wait()
228 |
229 | guard let response = resp as? HTTPURLResponse, data != nil else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
230 | throw error
231 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:229:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 | sema.wait()
228 |
229 | guard let response = resp as? HTTPURLResponse, data != nil else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 | throw error
231 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:244:17: error: cannot find 'URLRequest' in scope
242 | throw RequestError.invalidURL(url: url)
243 | }
244 | var request = URLRequest(url: nsUrl)
| `- error: cannot find 'URLRequest' in scope
245 | request.setValue(String(request.httpBody?.count ?? 0), forHTTPHeaderField: "Content-Length")
246 | return try performRequest(request)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:263:17: error: cannot find 'URLRequest' in scope
261 | throw RequestError.notUTF8
262 | }
263 | var request = URLRequest(url: nsUrl)
| `- error: cannot find 'URLRequest' in scope
264 | request.httpMethod = "POST"
265 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:271:13: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |
270 | var responseData: Data?
271 | var resp: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | var responseError: Error?
273 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:275:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
273 |
274 | queue.async {
275 | let task = self.session.uploadTask(with: request, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
276 | self.performTask(task, request: request) {data, response, error in
277 | (responseData, resp, responseError) = (data, response, error)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:360:48: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
358 | super.init()
359 |
360 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
361 |
362 | if proxyAddress != nil {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:368:6: error: cannot find 'kCFNetworkProxiesHTTPProxy' in scope
366 | configuration.connectionProxyDictionary = [
367 | "HTTPEnable" : 1,
368 | kCFNetworkProxiesHTTPProxy as AnyHashable : proxyAddress!,
| `- error: cannot find 'kCFNetworkProxiesHTTPProxy' in scope
369 | kCFNetworkProxiesHTTPPort as AnyHashable : proxyPort,
370 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:369:6: error: cannot find 'kCFNetworkProxiesHTTPPort' in scope
367 | "HTTPEnable" : 1,
368 | kCFNetworkProxiesHTTPProxy as AnyHashable : proxyAddress!,
369 | kCFNetworkProxiesHTTPPort as AnyHashable : proxyPort,
| `- error: cannot find 'kCFNetworkProxiesHTTPPort' in scope
370 |
371 | "HTTPSEnable" : 1,
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:372:6: error: cannot find 'kCFNetworkProxiesHTTPSProxy' in scope
370 |
371 | "HTTPSEnable" : 1,
372 | kCFNetworkProxiesHTTPSProxy as AnyHashable : proxyAddress!,
| `- error: cannot find 'kCFNetworkProxiesHTTPSProxy' in scope
373 | kCFNetworkProxiesHTTPSPort as AnyHashable : proxyPort
374 | ]
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:373:6: error: cannot find 'kCFNetworkProxiesHTTPSPort' in scope
371 | "HTTPSEnable" : 1,
372 | kCFNetworkProxiesHTTPSProxy as AnyHashable : proxyAddress!,
373 | kCFNetworkProxiesHTTPSPort as AnyHashable : proxyPort
| `- error: cannot find 'kCFNetworkProxiesHTTPSPort' in scope
374 | ]
375 | #endif
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:384:13: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
382 | delegateQueue.maxConcurrentOperationCount = 1
383 |
384 | session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
385 | configuration: configuration,
386 | delegate: self, delegateQueue: delegateQueue
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:420:8: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
421 | }
422 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:437:23: error: cannot infer contextual base in reference to member 'cancel'
435 | guard let task = tasks[dataTask] else {
436 | print("\(dataTask) is not in client task list; cancelling")
437 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
438 | return
439 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:442:49: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
440 |
441 | var headers = [String:String]()
442 | for (k, v) in (response as? HTTPURLResponse)?.allHeaderFields ?? [:] {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
443 | headers[String(describing: k)] = String(describing: v)
444 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:442:65: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
440 |
441 | var headers = [String:String]()
442 | for (k, v) in (response as? HTTPURLResponse)?.allHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
443 | headers[String(describing: k)] = String(describing: v)
444 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:447:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
445 |
446 |
447 | task.response = response as? HTTPURLResponse
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
448 | completionHandler(.allow)
449 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:448:22: error: cannot infer contextual base in reference to member 'allow'
446 |
447 | task.response = response as? HTTPURLResponse
448 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
449 | }
450 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:487:26: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
485 |
486 | var headers = [String:String]()
487 | for (k, v) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
488 | headers[String(describing: k)] = String(describing: v)
489 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:497:11: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
495 |
496 | deinit {
497 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
498 | }
499 | }
[5/26] Compiling SwiftStack Answer.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:42:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 |
41 | ///The URLSession for this client.
42 | open var session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 |
44 | ///The queue used for asynchronous operations.
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:38: error: cannot find type 'URLRequest' in scope
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: cannot find type 'URLRequest' in scope
208 | let req = request
209 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:207:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 | ///- parameter request: The request to perform.
206 | ///- returns: The data and response returned by the request.
207 | open func performRequest(_ request: URLRequest) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
208 | let req = request
209 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:240:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
238 | ///- parameter url: The URL to send the request to.
239 | ///- returns: The data and response returned by the request.
240 | open func get(_ url: String) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
241 | guard let nsUrl = URL(string: url) else {
242 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:256:74: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | ///
255 | ///- returns: The data and response returned by the request.
256 | open func post(_ url: String, fields: [String:String]) throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 | guard let nsUrl = URL(string: url) else {
258 | throw RequestError.invalidURL(url: url)
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:305:38: error: cannot find type 'URLRequest' in scope
303 | ///- parameter request: The request to perform.
304 | ///- returns: The text returned by the request.
305 | open func performRequest(_ request: URLRequest) throws -> String {
| `- error: cannot find type 'URLRequest' in scope
306 | let (data, _) = try performRequest(request)
307 | guard let string = String(data: data, encoding: String.Encoding.utf8) else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:397:13: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
395 | //MARK: - Task management
396 | internal class HTTPTask {
397 | var task: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:398:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 | internal class HTTPTask {
397 | var task: URLSessionTask
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
399 |
400 | var request: URLRequest!
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:400:16: error: cannot find type 'URLRequest' in scope
398 | var completion: (Data?, HTTPURLResponse?, Error?) -> Void
399 |
400 | var request: URLRequest!
| `- error: cannot find type 'URLRequest' in scope
401 |
402 | var data: Data?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:403:17: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
401 |
402 | var data: Data?
403 | var response: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:39: error: cannot find type 'URLRequest' in scope
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
407 | self.task = task
408 | self.completion = completion
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:406:82: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
404 | var error: Error?
405 |
406 | init(task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
407 | self.task = task
408 | self.completion = completion
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:61: error: cannot find type 'URLRequest' in scope
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:36: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:418:104: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
416 |
417 |
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:433:44: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
434 |
435 | guard let task = tasks[dataTask] else {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:430:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
428 | //MARK: - URLSession delegate methods
429 | public func urlSession(
430 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:431:13: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | public func urlSession(
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
432 | didReceive response: URLResponse,
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:432:24: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
430 | _ session: URLSession,
431 | dataTask: URLSessionDataTask,
432 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
433 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) {
434 |
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/SwiftStack/APIClient.swift:451:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:451:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
449 | }
450 |
451 | public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
452 | guard let task = tasks[dataTask] else {
453 | print("\(dataTask) is not in client task list; ignoring")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:465:66: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
463 | }
464 |
465 | public func urlSession(_ session: URLSession, task sessionTask: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
466 | guard let task = tasks[sessionTask] else {
467 | print("\(sessionTask) is not in client task list; ignoring")
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:482:23: error: cannot find type 'URLRequest' in scope
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
483 | completionHandler: @escaping (URLRequest?) -> Void
484 | ) {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:483:33: error: cannot find type 'URLRequest' in scope
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
484 | ) {
485 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:479:14: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
477 |
478 | public func urlSession(
479 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:480:9: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
478 | public func urlSession(
479 | _ session: URLSession,
480 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
481 | willPerformHTTPRedirection response: HTTPURLResponse,
482 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:481:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
479 | _ session: URLSession,
480 | task: URLSessionTask,
481 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 | newRequest request: URLRequest,
483 | completionHandler: @escaping (URLRequest?) -> Void
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:38:33: error: cannot find type 'URLSessionDataDelegate' in scope
36 |
37 | ///An APIClient communicates to the Stack Exchange API over HTTP.
38 | open class APIClient: NSObject, URLSessionDataDelegate {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
39 | //MARK: Instance variables and types.
40 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:212:13: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
210 | let sema = DispatchSemaphore(value: 0)
211 | var data: Data!
212 | var resp: URLResponse!
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 | var error: Error!
214 |
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/SwiftStack/APIClient.swift:219:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
217 | //TODO: I don't think this needs to be on the client queue anymore
218 | queue.async {
219 | let task = self.session.dataTask(with: req)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
220 | self.performTask(task, request: req) {inData, inResp, inError in
221 | (data, resp, error) = (inData, inResp, inError)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:229:29: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
227 | sema.wait()
228 |
229 | guard let response = resp as? HTTPURLResponse, data != nil else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
230 | throw error
231 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:229:33: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 | sema.wait()
228 |
229 | guard let response = resp as? HTTPURLResponse, data != nil else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 | throw error
231 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:244:17: error: cannot find 'URLRequest' in scope
242 | throw RequestError.invalidURL(url: url)
243 | }
244 | var request = URLRequest(url: nsUrl)
| `- error: cannot find 'URLRequest' in scope
245 | request.setValue(String(request.httpBody?.count ?? 0), forHTTPHeaderField: "Content-Length")
246 | return try performRequest(request)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:263:17: error: cannot find 'URLRequest' in scope
261 | throw RequestError.notUTF8
262 | }
263 | var request = URLRequest(url: nsUrl)
| `- error: cannot find 'URLRequest' in scope
264 | request.httpMethod = "POST"
265 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:271:13: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |
270 | var responseData: Data?
271 | var resp: HTTPURLResponse?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | var responseError: Error?
273 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:275:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
273 |
274 | queue.async {
275 | let task = self.session.uploadTask(with: request, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
276 | self.performTask(task, request: request) {data, response, error in
277 | (responseData, resp, responseError) = (data, response, error)
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:360:48: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
358 | super.init()
359 |
360 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
361 |
362 | if proxyAddress != nil {
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:368:6: error: cannot find 'kCFNetworkProxiesHTTPProxy' in scope
366 | configuration.connectionProxyDictionary = [
367 | "HTTPEnable" : 1,
368 | kCFNetworkProxiesHTTPProxy as AnyHashable : proxyAddress!,
| `- error: cannot find 'kCFNetworkProxiesHTTPProxy' in scope
369 | kCFNetworkProxiesHTTPPort as AnyHashable : proxyPort,
370 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:369:6: error: cannot find 'kCFNetworkProxiesHTTPPort' in scope
367 | "HTTPEnable" : 1,
368 | kCFNetworkProxiesHTTPProxy as AnyHashable : proxyAddress!,
369 | kCFNetworkProxiesHTTPPort as AnyHashable : proxyPort,
| `- error: cannot find 'kCFNetworkProxiesHTTPPort' in scope
370 |
371 | "HTTPSEnable" : 1,
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:372:6: error: cannot find 'kCFNetworkProxiesHTTPSProxy' in scope
370 |
371 | "HTTPSEnable" : 1,
372 | kCFNetworkProxiesHTTPSProxy as AnyHashable : proxyAddress!,
| `- error: cannot find 'kCFNetworkProxiesHTTPSProxy' in scope
373 | kCFNetworkProxiesHTTPSPort as AnyHashable : proxyPort
374 | ]
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:373:6: error: cannot find 'kCFNetworkProxiesHTTPSPort' in scope
371 | "HTTPSEnable" : 1,
372 | kCFNetworkProxiesHTTPSProxy as AnyHashable : proxyAddress!,
373 | kCFNetworkProxiesHTTPSPort as AnyHashable : proxyPort
| `- error: cannot find 'kCFNetworkProxiesHTTPSPort' in scope
374 | ]
375 | #endif
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:384:13: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
382 | delegateQueue.maxConcurrentOperationCount = 1
383 |
384 | session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
385 | configuration: configuration,
386 | delegate: self, delegateQueue: delegateQueue
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:420:8: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
418 | internal func performTask(_ task: URLSessionTask, request: URLRequest!, completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void) {
419 | tasks[task] = HTTPTask(task: task, request: request, completion: completion)
420 | task.resume()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
421 | }
422 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:437:23: error: cannot infer contextual base in reference to member 'cancel'
435 | guard let task = tasks[dataTask] else {
436 | print("\(dataTask) is not in client task list; cancelling")
437 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
438 | return
439 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:442:49: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
440 |
441 | var headers = [String:String]()
442 | for (k, v) in (response as? HTTPURLResponse)?.allHeaderFields ?? [:] {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
443 | headers[String(describing: k)] = String(describing: v)
444 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:442:65: error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
440 |
441 | var headers = [String:String]()
442 | for (k, v) in (response as? HTTPURLResponse)?.allHeaderFields ?? [:] {
| `- error: pattern cannot match values of type '(key: AnyHashable, value: Any)'
443 | headers[String(describing: k)] = String(describing: v)
444 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:447:28: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
445 |
446 |
447 | task.response = response as? HTTPURLResponse
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
448 | completionHandler(.allow)
449 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:448:22: error: cannot infer contextual base in reference to member 'allow'
446 |
447 | task.response = response as? HTTPURLResponse
448 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
449 | }
450 |
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:487:26: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
485 |
486 | var headers = [String:String]()
487 | for (k, v) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
488 | headers[String(describing: k)] = String(describing: v)
489 | }
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:497:11: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
495 |
496 | deinit {
497 | session.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
498 | }
499 | }
[6/26] Compiling SwiftStack RequestsRevisions.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[7/26] Compiling SwiftStack RequestsSites.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[8/26] Compiling SwiftStack RequestsSuggestedEdits.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[9/26] Compiling SwiftStack Post.swift
[10/26] Compiling SwiftStack Privilege.swift
[11/26] Compiling SwiftStack Question.swift
[12/26] Compiling SwiftStack StringRepresentable.swift
[13/26] Compiling SwiftStack SuggestedEdit.swift
[14/26] Compiling SwiftStack User.swift
[15/26] Compiling SwiftStack DictionaryConvertible.swift
[16/26] Compiling SwiftStack JsonConvertible.swift
[17/26] Compiling SwiftStack JsonHelper.swift
[18/26] Compiling SwiftStack Revision.swift
[19/26] Compiling SwiftStack Site.swift
[20/26] Compiling SwiftStack String+HTMLEntities.swift
[21/26] Compiling SwiftStack BadgeCount.swift
[22/26] Compiling SwiftStack Comment.swift
[23/26] Compiling SwiftStack Content.swift
[24/26] Compiling SwiftStack RequestsAnswers.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[25/26] Compiling SwiftStack RequestsPrivileges.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
[26/26] Compiling SwiftStack RequestsQuestions.swift
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: type 'URLSessionTask' (aka 'AnyObject') does not conform to protocol 'Hashable'
414 |
415 | private var responseSemaphore: DispatchSemaphore?
/host/spi-builder-workspace/Sources/SwiftStack/APIClient.swift:413:23: error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
411 | }
412 |
413 | internal var tasks = [URLSessionTask:HTTPTask]()
| `- error: 'URLSessionTask' (aka 'AnyObject') cannot be used as a type conforming to protocol 'Hashable' because 'Hashable' has static requirements
414 |
415 | private var responseSemaphore: DispatchSemaphore?
BUILD FAILURE 6.1 android