Build Information
Failed to build NotionSwift, reference main (3dd240), with Swift 6.3 for Wasm on 15 Apr 2026 00:07:53 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/chojnac/NotionSwift.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/chojnac/NotionSwift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 3dd2406 Add support for filtering databases using the Status property type (#54)
Cloned https://github.com/chojnac/NotionSwift.git
Revision (git rev-parse @):
3dd2406ebb60d247ea781b09c9e537b2068df7c7
SUCCESS checkout https://github.com/chojnac/NotionSwift.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.3
Building package at path: $PWD
https://github.com/chojnac/NotionSwift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d69f4e7582c319245442d62a08b2d7c7fd5a0c0c69f5d2ef11d1530cd8d3329b
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/57] Emitting module NotionSwift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[4/64] Compiling NotionSwift NotionClient+Pages.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[5/64] Compiling NotionSwift NotionClient+Search.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[6/64] Compiling NotionSwift NotionClient+Users.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[7/64] Compiling NotionSwift NotionClient.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[8/64] Compiling NotionSwift NotionClientError.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[9/64] Compiling NotionSwift NotionClientType+Combine.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[10/64] Compiling NotionSwift NotionClientType.swift
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
/host/spi-builder-workspace/Sources/NotionSwift/NotionClient.swift:19:58: error: value of type '_' expected to be instance of class or class-constrained type
17 | public init(
18 | accessKeyProvider: AccessKeyProvider,
19 | sessionConfiguration: URLSessionConfiguration = .default
| `- error: value of type '_' expected to be instance of class or class-constrained type
20 | ) {
21 | self.accessKeyProvider = accessKeyProvider
[11/64] Compiling NotionSwift DatabaseParent.swift
[12/64] Compiling NotionSwift DatabaseProperty.swift
[13/64] Compiling NotionSwift DatabasePropertyType.swift
[14/64] Compiling NotionSwift DateRange.swift
[15/64] Compiling NotionSwift DateValue.swift
[16/64] Compiling NotionSwift ErrorResponse.swift
[17/64] Compiling NotionSwift FileFile.swift
[18/64] Compiling NotionSwift IconFile.swift
[19/64] Compiling NotionSwift DatabaseQueryParams.swift
[20/64] Compiling NotionSwift DatabaseSort.swift
[21/64] Compiling NotionSwift DatabaseUpdateRequest.swift
[22/64] Compiling NotionSwift CompountFilterType.swift
[23/64] Compiling NotionSwift DatabaseFilter.swift
[24/64] Compiling NotionSwift DatabaseFilterType.swift
[25/64] Compiling NotionSwift DatabasePropertyFilter+Encodable.swift
[26/64] Compiling NotionSwift DatabasePropertyFilter.swift
[27/64] Compiling NotionSwift PageCreateRequest.swift
[28/64] Compiling NotionSwift PageUpdateRequest.swift
[29/64] Compiling NotionSwift SearchRequest.swift
[30/64] Compiling NotionSwift ListResponse.swift
[31/64] Compiling NotionSwift SearchResponse.swift
[32/64] Compiling NotionSwift RichText+extensions.swift
[33/64] Compiling NotionSwift RichText.swift
[34/64] Compiling NotionSwift BlockType+Values.swift
[35/64] Compiling NotionSwift BlockType.swift
[36/64] Compiling NotionSwift ReadBlock.swift
[37/64] Compiling NotionSwift UpdateBlock.swift
[38/64] Compiling NotionSwift WriteBlock+Builders.swift
[39/64] Compiling NotionSwift WriteBlock.swift
[40/64] Compiling NotionSwift CoverFile.swift
[41/64] Compiling NotionSwift Database.swift
[42/64] Compiling NotionSwift AccessKeyProvider.swift
[43/64] Compiling NotionSwift EntityIdentifier.swift
[44/64] Compiling NotionSwift Logger.swift
[45/64] Compiling NotionSwift Types.swift
[46/64] Compiling NotionSwift Environment.swift
[47/64] Compiling NotionSwift Block.swift
[48/64] Compiling NotionSwift BlockColor.swift
[49/64] Compiling NotionSwift BlockType+Builders.swift
[50/64] Compiling NotionSwift Mention.swift
[51/64] Compiling NotionSwift NotionLink.swift
[52/64] Compiling NotionSwift Page.swift
[53/64] Compiling NotionSwift PageParentType.swift
[54/64] Compiling NotionSwift PageProperty.swift
[55/64] Compiling NotionSwift PartialUser.swift
[56/64] Compiling NotionSwift BaseQueryParams.swift
[57/64] Compiling NotionSwift DatabaseCreateRequest.swift
[58/64] Compiling NotionSwift User.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
[59/64] Compiling NotionSwift DateFormatter+ISO8601Full.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
[60/64] Compiling NotionSwift NetworkClient.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
[61/64] Compiling NotionSwift NetworkClientHelpers.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
[62/64] Compiling NotionSwift URLBuilder.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
[63/64] Compiling NotionSwift NotionClient+Blocks.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
[64/64] Compiling NotionSwift NotionClient+Database.swift
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:63:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 | private let encoder: JSONEncoder
62 | private let decoder: JSONDecoder
63 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
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/NotionSwift/Network/NetworkClient.swift:65:39: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 | private let session: URLSession
64 |
65 | public init(sessionConfiguration: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | encoder = JSONEncoder()
67 | encoder.dateEncodingStrategy = .formatted(DateFormatter.iso8601Full)
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:179:10: error: cannot find type 'URLRequest' in scope
177 | url: URL,
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
180 | var request = URLRequest(url: url)
181 | request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:190:18: error: cannot find type 'URLRequest' in scope
188 |
189 | private func executeRequest<T: Decodable>(
190 | request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
191 | completed: @escaping (Result<T, NotionClientError>) -> Void
192 | ) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:72:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 | decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
71 |
72 | session = .init(configuration: sessionConfiguration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
73 | }
74 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:81:45: error: cannot infer contextual base in reference to member 'GET'
79 | ) {
80 |
81 | let request = buildRequest(method: .GET, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'GET'
82 | executeRequest(request: request, completed: completed)
83 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:91:45: error: cannot infer contextual base in reference to member 'POST'
89 | completed: @escaping (Result<R, NotionClientError>) -> Void
90 | ) {
91 | var request = buildRequest(method: .POST, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'POST'
92 | let requestBody: Data
93 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:113:45: error: cannot infer contextual base in reference to member 'PATCH'
111 | completed: @escaping (Result<R, NotionClientError>) -> Void
112 | ) {
113 | var request = buildRequest(method: .PATCH, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'PATCH'
114 | let requestBody: Data
115 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:155:45: error: cannot infer contextual base in reference to member 'DELETE'
153 | completed: @escaping (Result<R, NotionClientError>) -> Void
154 | ) {
155 | var request = buildRequest(method: .DELETE, url: url, headers: headers)
| `- error: cannot infer contextual base in reference to member 'DELETE'
156 | if let body = body {
157 | let requestBody: Data
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:180:23: error: cannot find 'URLRequest' in scope
178 | headers: Network.HTTPHeaders
179 | ) -> URLRequest {
180 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
181 | request.httpMethod = method.rawValue
182 | for item in headers {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:214:13: error: cannot find 'DispatchQueue' in scope
212 | }
213 |
214 | DispatchQueue.main.async {
| `- error: cannot find 'DispatchQueue' in scope
215 | guard let completeResult = completeResult else {
216 | fatalError("Something is wrong, no result!")
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:194:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
192 | ) {
193 | Environment.log.debug("Request: \(request.httpMethod ?? "") \(request.url?.absoluteString ?? "")")
194 | let task = session.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
195 | var completeResult: Result<T, NotionClientError>?
196 |
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClient.swift:197:84: error: argument type '_' expected to be an instance of a class or class-constrained type
195 | var completeResult: Result<T, NotionClientError>?
196 |
197 | if let error = NetworkClientHelpers.extractError(data: data, response: response, error: error) {
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
198 | completeResult = .failure(error)
199 | } else if let data = data {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:11:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 |
10 | public enum NetworkClientHelpers {
11 | public static func extractError(data: Data?, response: URLResponse?, error: Error?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | if let error = error {
13 | return .genericError(error)
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/NotionSwift/Network/NetworkClientHelpers.swift:19:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | }
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | guard let response = response as? HTTPURLResponse else {
21 | return .unsupportedResponseError
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/NotionSwift/Network/NetworkClientHelpers.swift:20:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
21 | return .unsupportedResponseError
22 | }
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:20:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |
19 | public static func extractError(data: Data?, response: URLResponse?) -> NotionClientError? {
20 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 | return .unsupportedResponseError
22 | }
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/NotionSwift/Network/NetworkClientHelpers.swift:24:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 | }
23 |
24 | if (400..<503).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
25 | if let data = data {
26 | if let err = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:29:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
27 | return .apiError(status: err.status, code: err.code, message: err.message)
28 | } else {
29 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
/host/spi-builder-workspace/Sources/NotionSwift/Network/NetworkClientHelpers.swift:32:78: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
30 | }
31 | } else {
32 | return .genericError(Network.Errors.HTTPError(code: response.statusCode))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 | }
34 | }
BUILD FAILURE 6.3 wasm