Build Information
Failed to build OpenGraph, reference main (a2518c
), with Swift 6.1 for Wasm on 30 May 2025 13:35:17 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/satoshi-takano/OpenGraph.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/satoshi-takano/OpenGraph
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at a2518cc Merge pull request #77 from joshbetz/patch-1
Cloned https://github.com/satoshi-takano/OpenGraph.git
Revision (git rev-parse @):
a2518cc4ece43f4463c4132f5c7418c0d261aa36
SUCCESS checkout https://github.com/satoshi-takano/OpenGraph.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/satoshi-takano/OpenGraph.git
https://github.com/satoshi-takano/OpenGraph.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
{
"identity" : "ohhttpstubs",
"requirement" : {
"range" : [
{
"lower_bound" : "9.0.0",
"upper_bound" : "10.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/AliSoftware/OHHTTPStubs"
}
],
"manifest_display_name" : "OpenGraph",
"name" : "OpenGraph",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "tvos",
"version" : "9.0"
},
{
"name" : "watchos",
"version" : "2.0"
}
],
"products" : [
{
"name" : "OpenGraph",
"targets" : [
"OpenGraph"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"swift_languages_versions" : [
"5"
],
"targets" : [
{
"c99name" : "OpenGraphTests",
"module_type" : "SwiftTarget",
"name" : "OpenGraphTests",
"path" : "Tests",
"product_dependencies" : [
"OHHTTPStubsSwift"
],
"resources" : [
{
"path" : "/host/spi-builder-workspace/Tests/Resources/empty_ogp.html",
"rule" : {
"process" : {
}
}
},
{
"path" : "/host/spi-builder-workspace/Tests/Resources/example3.com.html",
"rule" : {
"process" : {
}
}
},
{
"path" : "/host/spi-builder-workspace/Tests/Resources/ogp.html",
"rule" : {
"process" : {
}
}
}
],
"sources" : [
"OpenGraphTests.swift"
],
"target_dependencies" : [
"OpenGraph"
],
"type" : "test"
},
{
"c99name" : "OpenGraph",
"module_type" : "SwiftTarget",
"name" : "OpenGraph",
"path" : "Sources/OpenGraph",
"product_memberships" : [
"OpenGraph"
],
"sources" : [
"Extension/Data.swift",
"Extension/String.swift",
"Extension/URLSession.swift",
"OpenGraph.swift",
"OpenGraphMetadata.swift",
"OpenGraphParseError.swift",
"OpenGraphParser.swift",
"OpenGraphResponseError.swift"
],
"type" : "library"
}
],
"tools_version" : "5.3"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Fetching https://github.com/AliSoftware/OHHTTPStubs
[1/7900] Fetching ohhttpstubs
Fetched https://github.com/AliSoftware/OHHTTPStubs from cache (0.97s)
Computing version for https://github.com/AliSoftware/OHHTTPStubs
Computed https://github.com/AliSoftware/OHHTTPStubs at 9.1.0 (2.11s)
Creating working copy for https://github.com/AliSoftware/OHHTTPStubs
Working copy of https://github.com/AliSoftware/OHHTTPStubs resolved at 9.1.0
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling OpenGraph OpenGraphParser.swift
[4/10] Compiling OpenGraph OpenGraphParseError.swift
[5/11] Compiling OpenGraph OpenGraphMetadata.swift
[6/11] Compiling OpenGraph OpenGraph.swift
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:12:186: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:31:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:31:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:54:66: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | guard let data = data, let response = response as? HTTPURLResponse else {
56 | return
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/OpenGraph/OpenGraph.swift:71:65: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 |
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
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/OpenGraph/OpenGraph.swift:13:33: error: cannot find 'URLRequest' in scope
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
13 | var mutableURLRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
14 | headers?.compactMapValues { $0 }.forEach {
15 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:17:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
15 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
16 | }
17 | let session = URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
18 | let task = session.dataTask(with: mutableURLRequest, completionHandler: { data, response, error in
19 | if let error = error {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:22:57: error: argument type '_' expected to be an instance of a class or class-constrained type
20 | completion(.failure(error))
21 | } else {
22 | handleFetchResult(data: data, response: response, completion: completion)
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
23 | }
24 | })
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:32:33: error: cannot find 'URLRequest' in scope
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
32 | var mutableURLRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
33 | headers?.compactMapValues { $0 }.forEach {
34 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:36:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
34 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
35 | }
36 | let session = URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
37 | let (data, response) = try await session.data(for: mutableURLRequest)
38 | return try handleFetchResult(data: data, response: response)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:55:56: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
55 | guard let data = data, let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
56 | return
57 | }
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:55:60: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
55 | guard let data = data, let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | return
57 | }
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/OpenGraph/OpenGraph.swift:58:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
56 | return
57 | }
58 | if !(200..<300).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
59 | completion(.failure(OpenGraphResponseError.unexpectedStatusCode(response.statusCode)))
60 | } else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:59:86: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
57 | }
58 | if !(200..<300).contains(response.statusCode) {
59 | completion(.failure(OpenGraphResponseError.unexpectedStatusCode(response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
60 | } else {
61 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:61:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'textEncodingName'
59 | completion(.failure(OpenGraphResponseError.unexpectedStatusCode(response.statusCode)))
60 | } else {
61 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'textEncodingName'
62 | completion(.failure(OpenGraphParseError.encodingError))
63 | return
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:72:36: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
72 | if let response = response as? HTTPURLResponse,
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
73 | !(200..<300).contains(response.statusCode) {
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:72:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
72 | if let response = response as? HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | !(200..<300).contains(response.statusCode) {
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
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/OpenGraph/OpenGraph.swift:73:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
75 | } else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:74:72: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
75 | } else {
76 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:76:82: error: value of type 'URLResponse' (aka 'AnyObject') has no member 'textEncodingName'
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
75 | } else {
76 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
| `- error: value of type 'URLResponse' (aka 'AnyObject') has no member 'textEncodingName'
77 | throw OpenGraphParseError.encodingError
78 | }
[7/11] Compiling OpenGraph URLSession.swift
/host/spi-builder-workspace/Sources/OpenGraph/Extension/URLSession.swift:17:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
15 |
16 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
17 | public extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
18 | /// Start a data task with a URL using async/await.
19 | /// - parameter url: The URL to send a request to.
/host/spi-builder-workspace/Sources/OpenGraph/Extension/URLSession.swift:32:26: error: cannot find type 'URLRequest' in scope
30 | /// as well as a `URLResponse` representing the server's response.
31 | /// - throws: Any error encountered while performing the data task.
32 | func data(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
33 | try await withCheckedThrowingContinuation { continuation in
34 | self.dataTask(with: request) { data, response, error in
[8/11] Compiling OpenGraph OpenGraphResponseError.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/11] Compiling OpenGraph Data.swift
/host/spi-builder-workspace/Sources/OpenGraph/Extension/Data.swift:18:44: error: type 'NSString' has no member 'stringEncoding'
16 | #else
17 | var nsString: NSString?
18 | guard case let rawValue = NSString.stringEncoding(for: self, encodingOptions: nil, convertedString: &nsString, usedLossyConversion: nil), rawValue != 0 else { return nil }
| `- error: type 'NSString' has no member 'stringEncoding'
19 | return String.Encoding(rawValue: rawValue)
20 | #endif
/host/spi-builder-workspace/Sources/OpenGraph/Extension/Data.swift:18:87: error: 'nil' requires a contextual type
16 | #else
17 | var nsString: NSString?
18 | guard case let rawValue = NSString.stringEncoding(for: self, encodingOptions: nil, convertedString: &nsString, usedLossyConversion: nil), rawValue != 0 else { return nil }
| `- error: 'nil' requires a contextual type
19 | return String.Encoding(rawValue: rawValue)
20 | #endif
/host/spi-builder-workspace/Sources/OpenGraph/Extension/Data.swift:18:141: error: 'nil' requires a contextual type
16 | #else
17 | var nsString: NSString?
18 | guard case let rawValue = NSString.stringEncoding(for: self, encodingOptions: nil, convertedString: &nsString, usedLossyConversion: nil), rawValue != 0 else { return nil }
| `- error: 'nil' requires a contextual type
19 | return String.Encoding(rawValue: rawValue)
20 | #endif
[10/11] Compiling OpenGraph String.swift
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:15:27: error: cannot find 'CFStringConvertIANACharSetNameToEncoding' in scope
13 | let encoding: String.Encoding = {
14 | if let textEncodingName = textEncodingName {
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
| `- error: cannot find 'CFStringConvertIANACharSetNameToEncoding' in scope
16 | if cfe != kCFStringEncodingInvalidId {
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:16:27: error: cannot find 'kCFStringEncodingInvalidId' in scope
14 | if let textEncodingName = textEncodingName {
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
16 | if cfe != kCFStringEncodingInvalidId {
| `- error: cannot find 'kCFStringEncodingInvalidId' in scope
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
18 | return String.Encoding(rawValue: se)
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:17:30: error: cannot find 'CFStringConvertEncodingToNSStringEncoding' in scope
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
16 | if cfe != kCFStringEncodingInvalidId {
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
| `- error: cannot find 'CFStringConvertEncodingToNSStringEncoding' in scope
18 | return String.Encoding(rawValue: se)
19 | }
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:15:88: error: cannot find type 'CFString' in scope
13 | let encoding: String.Encoding = {
14 | if let textEncodingName = textEncodingName {
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
| `- error: cannot find type 'CFString' in scope
16 | if cfe != kCFStringEncodingInvalidId {
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
[11/11] Emitting module OpenGraph
/host/spi-builder-workspace/Sources/OpenGraph/Extension/URLSession.swift:17:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
15 |
16 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
17 | public extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
18 | /// Start a data task with a URL using async/await.
19 | /// - parameter url: The URL to send a request to.
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:12:186: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:31:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:31:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:54:66: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | guard let data = data, let response = response as? HTTPURLResponse else {
56 | return
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/OpenGraph/OpenGraph.swift:71:65: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 |
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
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
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/host/spi-builder-workspace/Tests/Info.plist
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] Compiling OpenGraph OpenGraphParseError.swift
[3/10] Compiling OpenGraph OpenGraph.swift
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:12:186: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:31:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:31:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:54:66: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | guard let data = data, let response = response as? HTTPURLResponse else {
56 | return
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/OpenGraph/OpenGraph.swift:71:65: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 |
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
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/OpenGraph/OpenGraph.swift:13:33: error: cannot find 'URLRequest' in scope
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
13 | var mutableURLRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
14 | headers?.compactMapValues { $0 }.forEach {
15 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:17:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
15 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
16 | }
17 | let session = URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
18 | let task = session.dataTask(with: mutableURLRequest, completionHandler: { data, response, error in
19 | if let error = error {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:22:57: error: argument type '_' expected to be an instance of a class or class-constrained type
20 | completion(.failure(error))
21 | } else {
22 | handleFetchResult(data: data, response: response, completion: completion)
| `- error: argument type '_' expected to be an instance of a class or class-constrained type
23 | }
24 | })
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:32:33: error: cannot find 'URLRequest' in scope
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
32 | var mutableURLRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
33 | headers?.compactMapValues { $0 }.forEach {
34 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:36:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
34 | mutableURLRequest.setValue($1, forHTTPHeaderField: $0)
35 | }
36 | let session = URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
37 | let (data, response) = try await session.data(for: mutableURLRequest)
38 | return try handleFetchResult(data: data, response: response)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:55:56: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
55 | guard let data = data, let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
56 | return
57 | }
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:55:60: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
55 | guard let data = data, let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | return
57 | }
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/OpenGraph/OpenGraph.swift:58:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
56 | return
57 | }
58 | if !(200..<300).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
59 | completion(.failure(OpenGraphResponseError.unexpectedStatusCode(response.statusCode)))
60 | } else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:59:86: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
57 | }
58 | if !(200..<300).contains(response.statusCode) {
59 | completion(.failure(OpenGraphResponseError.unexpectedStatusCode(response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
60 | } else {
61 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:61:82: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'textEncodingName'
59 | completion(.failure(OpenGraphResponseError.unexpectedStatusCode(response.statusCode)))
60 | } else {
61 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'textEncodingName'
62 | completion(.failure(OpenGraphParseError.encodingError))
63 | return
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:72:36: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
72 | if let response = response as? HTTPURLResponse,
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
73 | !(200..<300).contains(response.statusCode) {
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:72:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
72 | if let response = response as? HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | !(200..<300).contains(response.statusCode) {
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
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/OpenGraph/OpenGraph.swift:73:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
75 | } else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:74:72: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
75 | } else {
76 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:76:82: error: value of type 'URLResponse' (aka 'AnyObject') has no member 'textEncodingName'
74 | throw OpenGraphResponseError.unexpectedStatusCode(response.statusCode)
75 | } else {
76 | guard let htmlString = String(data: data, textEncodingName: response.textEncodingName) else {
| `- error: value of type 'URLResponse' (aka 'AnyObject') has no member 'textEncodingName'
77 | throw OpenGraphParseError.encodingError
78 | }
[4/10] Compiling OpenGraph Data.swift
/host/spi-builder-workspace/Sources/OpenGraph/Extension/Data.swift:18:44: error: type 'NSString' has no member 'stringEncoding'
16 | #else
17 | var nsString: NSString?
18 | guard case let rawValue = NSString.stringEncoding(for: self, encodingOptions: nil, convertedString: &nsString, usedLossyConversion: nil), rawValue != 0 else { return nil }
| `- error: type 'NSString' has no member 'stringEncoding'
19 | return String.Encoding(rawValue: rawValue)
20 | #endif
/host/spi-builder-workspace/Sources/OpenGraph/Extension/Data.swift:18:87: error: 'nil' requires a contextual type
16 | #else
17 | var nsString: NSString?
18 | guard case let rawValue = NSString.stringEncoding(for: self, encodingOptions: nil, convertedString: &nsString, usedLossyConversion: nil), rawValue != 0 else { return nil }
| `- error: 'nil' requires a contextual type
19 | return String.Encoding(rawValue: rawValue)
20 | #endif
/host/spi-builder-workspace/Sources/OpenGraph/Extension/Data.swift:18:141: error: 'nil' requires a contextual type
16 | #else
17 | var nsString: NSString?
18 | guard case let rawValue = NSString.stringEncoding(for: self, encodingOptions: nil, convertedString: &nsString, usedLossyConversion: nil), rawValue != 0 else { return nil }
| `- error: 'nil' requires a contextual type
19 | return String.Encoding(rawValue: rawValue)
20 | #endif
[5/10] Compiling OpenGraph URLSession.swift
/host/spi-builder-workspace/Sources/OpenGraph/Extension/URLSession.swift:17:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
15 |
16 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
17 | public extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
18 | /// Start a data task with a URL using async/await.
19 | /// - parameter url: The URL to send a request to.
/host/spi-builder-workspace/Sources/OpenGraph/Extension/URLSession.swift:32:26: error: cannot find type 'URLRequest' in scope
30 | /// as well as a `URLResponse` representing the server's response.
31 | /// - throws: Any error encountered while performing the data task.
32 | func data(for request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
33 | try await withCheckedThrowingContinuation { continuation in
34 | self.dataTask(with: request) { data, response, error in
[6/10] Compiling OpenGraph String.swift
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:15:27: error: cannot find 'CFStringConvertIANACharSetNameToEncoding' in scope
13 | let encoding: String.Encoding = {
14 | if let textEncodingName = textEncodingName {
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
| `- error: cannot find 'CFStringConvertIANACharSetNameToEncoding' in scope
16 | if cfe != kCFStringEncodingInvalidId {
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:16:27: error: cannot find 'kCFStringEncodingInvalidId' in scope
14 | if let textEncodingName = textEncodingName {
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
16 | if cfe != kCFStringEncodingInvalidId {
| `- error: cannot find 'kCFStringEncodingInvalidId' in scope
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
18 | return String.Encoding(rawValue: se)
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:17:30: error: cannot find 'CFStringConvertEncodingToNSStringEncoding' in scope
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
16 | if cfe != kCFStringEncodingInvalidId {
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
| `- error: cannot find 'CFStringConvertEncodingToNSStringEncoding' in scope
18 | return String.Encoding(rawValue: se)
19 | }
/host/spi-builder-workspace/Sources/OpenGraph/Extension/String.swift:15:88: error: cannot find type 'CFString' in scope
13 | let encoding: String.Encoding = {
14 | if let textEncodingName = textEncodingName {
15 | let cfe = CFStringConvertIANACharSetNameToEncoding(textEncodingName as CFString)
| `- error: cannot find type 'CFString' in scope
16 | if cfe != kCFStringEncodingInvalidId {
17 | let se = CFStringConvertEncodingToNSStringEncoding(cfe)
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/10] Emitting module OpenGraph
/host/spi-builder-workspace/Sources/OpenGraph/Extension/URLSession.swift:17:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
15 |
16 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
17 | public extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
18 | /// Start a data task with a URL using async/await.
19 | /// - parameter url: The URL to send a request to.
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:12:186: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:12:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
10 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
11 | @discardableResult
12 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default, completion: @escaping (Result<OpenGraph, Error>) -> Void) -> URLSessionDataTask {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
13 | var mutableURLRequest = URLRequest(url: url)
14 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:31:89: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
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/OpenGraph/OpenGraph.swift:31:116: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
29 | #if compiler(>=5.5.2) && canImport(_Concurrency)
30 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
31 | public static func fetch(url: URL, headers: [String: String]? = nil, configuration: URLSessionConfiguration = .default) async throws-> OpenGraph {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
32 | var mutableURLRequest = URLRequest(url: url)
33 | headers?.compactMapValues { $0 }.forEach {
/host/spi-builder-workspace/Sources/OpenGraph/OpenGraph.swift:54:66: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
54 | private static func handleFetchResult(data: Data?, response: URLResponse?, completion: @escaping (Result<OpenGraph, Error>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | guard let data = data, let response = response as? HTTPURLResponse else {
56 | return
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/OpenGraph/OpenGraph.swift:71:65: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 |
70 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
71 | private static func handleFetchResult(data: Data, response: URLResponse) throws -> OpenGraph {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
72 | if let response = response as? HTTPURLResponse,
73 | !(200..<300).contains(response.statusCode) {
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
[8/10] Compiling OpenGraph OpenGraphResponseError.swift
[9/10] Compiling OpenGraph OpenGraphParser.swift
[10/10] Compiling OpenGraph OpenGraphMetadata.swift
BUILD FAILURE 6.1 wasm