The Swift Package Index logo.Swift Package Index

Build Information

Failed to build EventSource, reference 0.1.7 (713f8c), with Swift 6.2 for Wasm on 21 Feb 2026 05:08:11 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest swift build --swift-sdk wasm32-unknown-wasip1 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Recouse/EventSource.git
Reference: 0.1.7
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/Recouse/EventSource
 * tag               0.1.7      -> FETCH_HEAD
HEAD is now at 713f8c0 Merge pull request #46 from Recouse/timeout-improvements
Cloned https://github.com/Recouse/EventSource.git
Revision (git rev-parse @):
713f8c0a0270a80a968c007ddc0d6067e80a5393
SUCCESS checkout https://github.com/Recouse/EventSource.git at 0.1.7
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/Recouse/EventSource.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest swift build --swift-sdk wasm32-unknown-wasip1 2>&1
wasm-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:c50555b47c4db0b0576f9f25702fbe2fdff28194c4a4f4c23a7dce4b3504c85e
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest
warning: multiple Swift SDKs match target triple `wasm32-unknown-wasip1` and host triple x86_64-unknown-linux-gnu, selected one at /root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/swift-sdk.json
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/11] Compiling EventSource Extensions.swift
[4/12] Compiling EventSource SessionDelegate.swift
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:14:40: error: cannot find type 'URLSessionDataDelegate' in scope
12 | #endif
13 |
14 | final class SessionDelegate: NSObject, URLSessionDataDelegate {
   |                                        `- error: cannot find type 'URLSessionDataDelegate' in scope
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:17:68: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
17 |         case didReceiveResponse(URLResponse, @Sendable (URLSession.ResponseDisposition) -> Void)
   |                                                                    `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |         case didReceiveData(Data)
19 |     }
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:17:33: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
17 |         case didReceiveResponse(URLResponse, @Sendable (URLSession.ResponseDisposition) -> Void)
   |                                 `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |         case didReceiveData(Data)
19 |     }
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/EventSource/SessionDelegate.swift:17:14: error: associated value 'didReceiveResponse' of 'Sendable'-conforming enum 'Event' contains non-Sendable type 'URLResponse' (aka 'AnyObject')
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
17 |         case didReceiveResponse(URLResponse, @Sendable (URLSession.ResponseDisposition) -> Void)
   |              `- error: associated value 'didReceiveResponse' of 'Sendable'-conforming enum 'Event' contains non-Sendable type 'URLResponse' (aka 'AnyObject')
18 |         case didReceiveData(Data)
19 |     }
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:26:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 |     func urlSession(
26 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 |         task: URLSessionTask,
28 |         didCompleteWithError error: Error?
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/EventSource/SessionDelegate.swift:27:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |     func urlSession(
26 |         _ session: URLSession,
27 |         task: URLSessionTask,
   |               `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |         didCompleteWithError error: Error?
29 |     ) {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:37:60: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
35 |         dataTask: URLSessionDataTask,
36 |         didReceive response: URLResponse,
37 |         completionHandler: @Sendable @escaping (URLSession.ResponseDisposition) -> Void
   |                                                            `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
38 |     ) {
39 |         internalStream.continuation.yield(.didReceiveResponse(response, completionHandler))
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:34:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 |     func urlSession(
34 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |         dataTask: URLSessionDataTask,
36 |         didReceive response: URLResponse,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:35:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     func urlSession(
34 |         _ session: URLSession,
35 |         dataTask: URLSessionDataTask,
   |                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |         didReceive response: URLResponse,
37 |         completionHandler: @Sendable @escaping (URLSession.ResponseDisposition) -> Void
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:36:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |         _ session: URLSession,
35 |         dataTask: URLSessionDataTask,
36 |         didReceive response: URLResponse,
   |                              `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 |         completionHandler: @Sendable @escaping (URLSession.ResponseDisposition) -> Void
38 |     ) {
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/EventSource/SessionDelegate.swift:43:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 |
42 |     func urlSession(
43 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 |         dataTask: URLSessionDataTask,
45 |         didReceive data: Data
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/EventSource/SessionDelegate.swift:44:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |     func urlSession(
43 |         _ session: URLSession,
44 |         dataTask: URLSessionDataTask,
   |                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
45 |         didReceive data: Data
46 |     ) {
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
[5/12] Compiling EventSource ServerEvent.swift
[6/12] Compiling EventSource EventSourceError.swift
[7/12] Compiling EventSource EventSource.swift
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:74:42: error: cannot find type 'URLRequest' in scope
 72 |     }
 73 |
 74 |     public func dataTask(for urlRequest: URLRequest) -> DataTask {
    |                                          `- error: cannot find type 'URLRequest' in scope
 75 |         DataTask(
 76 |             urlRequest: urlRequest,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:118:32: error: cannot find type 'URLRequest' in scope
116 |
117 |         /// A URLRequest of the events source.
118 |         public let urlRequest: URLRequest
    |                                `- error: cannot find type 'URLRequest' in scope
119 |
120 |         private let _eventParser: Mutex<EventParser>
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:157:46: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |         }
156 |
157 |         private var urlSessionConfiguration: URLSessionConfiguration {
    |                                              `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |             let configuration = URLSessionConfiguration.default
159 |             configuration.httpAdditionalHeaders = [
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/EventSource/EventSource.swift:170:25: error: cannot find type 'URLRequest' in scope
168 |
169 |         internal init(
170 |             urlRequest: URLRequest,
    |                         `- error: cannot find type 'URLRequest' in scope
171 |             eventParser: EventParser,
172 |             timeoutIntervalForRequest: TimeInterval,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:233:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 |             _ error: Error?,
232 |             stream continuation: AsyncStream<EventType>.Continuation,
233 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 |         ) {
235 |             guard readyState != .closed else {
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/EventSource/EventSource.swift:253:54: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
251 |             stream continuation: AsyncStream<EventType>.Continuation,
252 |             urlSession: URLSession,
253 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
    |                                                      `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
254 |         ) {
255 |             guard readyState != .closed else {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:250:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 |
249 |         private func handleSessionResponse(
250 |             _ response: URLResponse,
    |                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
251 |             stream continuation: AsyncStream<EventType>.Continuation,
252 |             urlSession: URLSession,
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/EventSource/EventSource.swift:252:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 |             _ response: URLResponse,
251 |             stream continuation: AsyncStream<EventType>.Continuation,
252 |             urlSession: URLSession,
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
254 |         ) {
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/EventSource/EventSource.swift:286:98: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
284 |         /// and sets the `readyState` property to `.closed`.
285 |         /// - Returns: State before closing.
286 |         private func close(stream continuation: AsyncStream<EventType>.Continuation, urlSession: URLSession) {
    |                                                                                                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
287 |             let previousState = self.readyState
288 |             if previousState != .closed {
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/EventSource/EventSource.swift:298:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
296 |             from data: Data,
297 |             stream continuation: AsyncStream<EventType>.Continuation,
298 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
299 |         ) {
300 |             if let httpResponseErrorStatusCode {
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/EventSource/EventSource.swift:337:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 |         /// canceling the parent Task only cancels the underlying `URLSessionDataTask` of
336 |         /// ``EventSource/EventSource/DataTask``; this does not actually stop the ongoing request.
337 |         private func cancel(urlSession: URLSession) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
338 |             readyState = .closed
339 |             lastMessageId = ""
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/EventSource/EventSource.swift:158:57: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
156 |
157 |         private var urlSessionConfiguration: URLSessionConfiguration {
158 |             let configuration = URLSessionConfiguration.default
    |                                                         `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
159 |             configuration.httpAdditionalHeaders = [
160 |                 HTTPHeaderField.accept: Accept.eventStream,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:192:34: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
190 |             return AsyncStream { continuation in
191 |                 let sessionDelegate = SessionDelegate()
192 |                 let urlSession = URLSession(
    |                                  `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
193 |                     configuration: urlSessionConfiguration,
194 |                     delegate: sessionDelegate,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:195:36: error: 'nil' requires a contextual type
193 |                     configuration: urlSessionConfiguration,
194 |                     delegate: sessionDelegate,
195 |                     delegateQueue: nil
    |                                    `- error: 'nil' requires a contextual type
196 |                 )
197 |                 let urlSessionDataTask = urlSession.dataTask(with: urlRequest)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:256:36: error: cannot infer contextual base in reference to member 'cancel'
254 |         ) {
255 |             guard readyState != .closed else {
256 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
257 |                 return
258 |             }
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:260:47: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
258 |             }
259 |
260 |             guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
261 |                 completionHandler(.cancel)
262 |                 return
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:260:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 |             }
259 |
260 |             guard let httpResponse = response as? HTTPURLResponse else {
    |                                                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
261 |                 completionHandler(.cancel)
262 |                 return
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/EventSource/EventSource.swift:261:36: error: cannot infer contextual base in reference to member 'cancel'
259 |
260 |             guard let httpResponse = response as? HTTPURLResponse else {
261 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
262 |                 return
263 |             }
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:266:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
264 |
265 |             // Stop connection when 204 response code, otherwise keep open
266 |             guard httpResponse.statusCode != 204 else {
    |                                `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
267 |                 completionHandler(.cancel)
268 |                 close(stream: continuation, urlSession: urlSession)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:267:36: error: cannot infer contextual base in reference to member 'cancel'
265 |             // Stop connection when 204 response code, otherwise keep open
266 |             guard httpResponse.statusCode != 204 else {
267 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
268 |                 close(stream: continuation, urlSession: urlSession)
269 |                 return
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:272:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
270 |             }
271 |
272 |             if 200...299 ~= httpResponse.statusCode {
    |                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
273 |                 if readyState != .open {
274 |                     setOpen(stream: continuation)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:277:60: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
275 |                 }
276 |             } else {
277 |                 httpResponseErrorStatusCode = httpResponse.statusCode
    |                                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |             }
279 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:280:32: error: cannot infer contextual base in reference to member 'allow'
278 |             }
279 |
280 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
281 |         }
282 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:340:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
338 |             readyState = .closed
339 |             lastMessageId = ""
340 |             urlSession.invalidateAndCancel()
    |                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
341 |         }
342 |     }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/12] Compiling EventSource Data+Trim.swift
[9/12] Compiling EventSource EventParser.swift
[10/12] Emitting module EventSource
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:74:42: error: cannot find type 'URLRequest' in scope
 72 |     }
 73 |
 74 |     public func dataTask(for urlRequest: URLRequest) -> DataTask {
    |                                          `- error: cannot find type 'URLRequest' in scope
 75 |         DataTask(
 76 |             urlRequest: urlRequest,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:118:32: error: cannot find type 'URLRequest' in scope
116 |
117 |         /// A URLRequest of the events source.
118 |         public let urlRequest: URLRequest
    |                                `- error: cannot find type 'URLRequest' in scope
119 |
120 |         private let _eventParser: Mutex<EventParser>
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:157:46: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |         }
156 |
157 |         private var urlSessionConfiguration: URLSessionConfiguration {
    |                                              `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |             let configuration = URLSessionConfiguration.default
159 |             configuration.httpAdditionalHeaders = [
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/EventSource/EventSource.swift:170:25: error: cannot find type 'URLRequest' in scope
168 |
169 |         internal init(
170 |             urlRequest: URLRequest,
    |                         `- error: cannot find type 'URLRequest' in scope
171 |             eventParser: EventParser,
172 |             timeoutIntervalForRequest: TimeInterval,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:233:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
231 |             _ error: Error?,
232 |             stream continuation: AsyncStream<EventType>.Continuation,
233 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
234 |         ) {
235 |             guard readyState != .closed else {
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/EventSource/EventSource.swift:253:54: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
251 |             stream continuation: AsyncStream<EventType>.Continuation,
252 |             urlSession: URLSession,
253 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
    |                                                      `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
254 |         ) {
255 |             guard readyState != .closed else {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:250:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
248 |
249 |         private func handleSessionResponse(
250 |             _ response: URLResponse,
    |                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
251 |             stream continuation: AsyncStream<EventType>.Continuation,
252 |             urlSession: URLSession,
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/EventSource/EventSource.swift:252:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 |             _ response: URLResponse,
251 |             stream continuation: AsyncStream<EventType>.Continuation,
252 |             urlSession: URLSession,
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
254 |         ) {
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/EventSource/EventSource.swift:286:98: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
284 |         /// and sets the `readyState` property to `.closed`.
285 |         /// - Returns: State before closing.
286 |         private func close(stream continuation: AsyncStream<EventType>.Continuation, urlSession: URLSession) {
    |                                                                                                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
287 |             let previousState = self.readyState
288 |             if previousState != .closed {
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/EventSource/EventSource.swift:298:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
296 |             from data: Data,
297 |             stream continuation: AsyncStream<EventType>.Continuation,
298 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
299 |         ) {
300 |             if let httpResponseErrorStatusCode {
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/EventSource/EventSource.swift:337:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 |         /// canceling the parent Task only cancels the underlying `URLSessionDataTask` of
336 |         /// ``EventSource/EventSource/DataTask``; this does not actually stop the ongoing request.
337 |         private func cancel(urlSession: URLSession) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
338 |             readyState = .closed
339 |             lastMessageId = ""
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/EventSource/SessionDelegate.swift:14:40: error: cannot find type 'URLSessionDataDelegate' in scope
12 | #endif
13 |
14 | final class SessionDelegate: NSObject, URLSessionDataDelegate {
   |                                        `- error: cannot find type 'URLSessionDataDelegate' in scope
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:17:68: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
17 |         case didReceiveResponse(URLResponse, @Sendable (URLSession.ResponseDisposition) -> Void)
   |                                                                    `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |         case didReceiveData(Data)
19 |     }
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:17:33: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
17 |         case didReceiveResponse(URLResponse, @Sendable (URLSession.ResponseDisposition) -> Void)
   |                                 `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |         case didReceiveData(Data)
19 |     }
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/EventSource/SessionDelegate.swift:17:14: error: associated value 'didReceiveResponse' of 'Sendable'-conforming enum 'Event' contains non-Sendable type 'URLResponse' (aka 'AnyObject')
15 |     enum Event: Sendable {
16 |         case didCompleteWithError(Error?)
17 |         case didReceiveResponse(URLResponse, @Sendable (URLSession.ResponseDisposition) -> Void)
   |              `- error: associated value 'didReceiveResponse' of 'Sendable'-conforming enum 'Event' contains non-Sendable type 'URLResponse' (aka 'AnyObject')
18 |         case didReceiveData(Data)
19 |     }
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:26:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 |
25 |     func urlSession(
26 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 |         task: URLSessionTask,
28 |         didCompleteWithError error: Error?
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/EventSource/SessionDelegate.swift:27:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |     func urlSession(
26 |         _ session: URLSession,
27 |         task: URLSessionTask,
   |               `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |         didCompleteWithError error: Error?
29 |     ) {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:37:60: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
35 |         dataTask: URLSessionDataTask,
36 |         didReceive response: URLResponse,
37 |         completionHandler: @Sendable @escaping (URLSession.ResponseDisposition) -> Void
   |                                                            `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
38 |     ) {
39 |         internalStream.continuation.yield(.didReceiveResponse(response, completionHandler))
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:34:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 |
33 |     func urlSession(
34 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |         dataTask: URLSessionDataTask,
36 |         didReceive response: URLResponse,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:35:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     func urlSession(
34 |         _ session: URLSession,
35 |         dataTask: URLSessionDataTask,
   |                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |         didReceive response: URLResponse,
37 |         completionHandler: @Sendable @escaping (URLSession.ResponseDisposition) -> Void
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/EventSource/SessionDelegate.swift:36:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |         _ session: URLSession,
35 |         dataTask: URLSessionDataTask,
36 |         didReceive response: URLResponse,
   |                              `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 |         completionHandler: @Sendable @escaping (URLSession.ResponseDisposition) -> Void
38 |     ) {
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/EventSource/SessionDelegate.swift:43:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 |
42 |     func urlSession(
43 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 |         dataTask: URLSessionDataTask,
45 |         didReceive data: Data
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/EventSource/SessionDelegate.swift:44:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 |     func urlSession(
43 |         _ session: URLSession,
44 |         dataTask: URLSessionDataTask,
   |                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
45 |         didReceive data: Data
46 |     ) {
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
[11/12] Compiling EventSource Headers.swift
[12/12] Compiling EventSource Mutex.swift
BUILD FAILURE 6.2 wasm