The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build EventSource, reference main (0ae631), with Swift 6.1 for Wasm on 6 Nov 2025 02:23:40 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Recouse/EventSource.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/Recouse/EventSource
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 0ae6311 Remove Build macOS 14 (Swift 5.10) job
Cloned https://github.com/Recouse/EventSource.git
Revision (git rev-parse @):
0ae6311a4ed0be0be56b66e4b4105ba8e86c9395
SUCCESS checkout https://github.com/Recouse/EventSource.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/Recouse/EventSource.git
https://github.com/Recouse/EventSource.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "EventSource",
  "name" : "EventSource",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    }
  ],
  "products" : [
    {
      "name" : "EventSource",
      "targets" : [
        "EventSource"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "EventSourceTests",
      "module_type" : "SwiftTarget",
      "name" : "EventSourceTests",
      "path" : "Tests/EventSourceTests",
      "sources" : [
        "EventParserTests.swift"
      ],
      "target_dependencies" : [
        "EventSource"
      ],
      "type" : "test"
    },
    {
      "c99name" : "EventSource",
      "module_type" : "SwiftTarget",
      "name" : "EventSource",
      "path" : "Sources/EventSource",
      "product_memberships" : [
        "EventSource"
      ],
      "sources" : [
        "Data+Trim.swift",
        "EventParser.swift",
        "EventSource.swift",
        "EventSourceError.swift",
        "Extensions.swift",
        "Headers.swift",
        "Mutex.swift",
        "ServerEvent.swift",
        "SessionDelegate.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "6.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:062e4aaff76454b333ce7957a8e87c3beb342f1dedb64399abb81cdea021b526
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/11] Compiling EventSource Mutex.swift
[4/11] Compiling EventSource Headers.swift
[5/11] Compiling EventSource ServerEvent.swift
[6/12] Compiling EventSource Extensions.swift
[7/12] Compiling EventSource EventSourceError.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/12] Emitting module EventSource
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:61:42: error: cannot find type 'URLRequest' in scope
 59 |     }
 60 |
 61 |     public func dataTask(for urlRequest: URLRequest) -> DataTask {
    |                                          `- error: cannot find type 'URLRequest' in scope
 62 |         DataTask(
 63 |             urlRequest: urlRequest,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:104:32: error: cannot find type 'URLRequest' in scope
102 |
103 |         /// A URLRequest of the events source.
104 |         public let urlRequest: URLRequest
    |                                `- error: cannot find type 'URLRequest' in scope
105 |
106 |         private let _eventParser: Mutex<EventParser>
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:141:46: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |         }
140 |
141 |         private var urlSessionConfiguration: URLSessionConfiguration {
    |                                              `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 |             let configuration = URLSessionConfiguration.default
143 |             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:154:25: error: cannot find type 'URLRequest' in scope
152 |
153 |         internal init(
154 |             urlRequest: URLRequest,
    |                         `- error: cannot find type 'URLRequest' in scope
155 |             eventParser: EventParser,
156 |             timeoutInterval: TimeInterval
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:215:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 |             _ error: Error?,
214 |             stream continuation: AsyncStream<EventType>.Continuation,
215 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
216 |         ) {
217 |             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:235:54: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
    |                                                      `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
236 |         ) {
237 |             guard readyState != .closed else {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:232:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 |
231 |         private func handleSessionResponse(
232 |             _ response: URLResponse,
    |                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             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:234:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 |             _ response: URLResponse,
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
236 |         ) {
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:268:98: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |         /// and sets the `readyState` property to `.closed`.
267 |         /// - Returns: State before closing.
268 |         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.
269 |             let previousState = self.readyState
270 |             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:280:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
278 |             from data: Data,
279 |             stream continuation: AsyncStream<EventType>.Continuation,
280 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
281 |         ) {
282 |             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:319:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
317 |         /// canceling the parent Task only cancels the underlying `URLSessionDataTask` of
318 |         /// ``EventSource/EventSource/DataTask``; this does not actually stop the ongoing request.
319 |         private func cancel(urlSession: URLSession) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
320 |             readyState = .closed
321 |             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' has 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' has 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
[9/12] Compiling EventSource EventSource.swift
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:61:42: error: cannot find type 'URLRequest' in scope
 59 |     }
 60 |
 61 |     public func dataTask(for urlRequest: URLRequest) -> DataTask {
    |                                          `- error: cannot find type 'URLRequest' in scope
 62 |         DataTask(
 63 |             urlRequest: urlRequest,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:104:32: error: cannot find type 'URLRequest' in scope
102 |
103 |         /// A URLRequest of the events source.
104 |         public let urlRequest: URLRequest
    |                                `- error: cannot find type 'URLRequest' in scope
105 |
106 |         private let _eventParser: Mutex<EventParser>
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:141:46: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |         }
140 |
141 |         private var urlSessionConfiguration: URLSessionConfiguration {
    |                                              `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 |             let configuration = URLSessionConfiguration.default
143 |             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:154:25: error: cannot find type 'URLRequest' in scope
152 |
153 |         internal init(
154 |             urlRequest: URLRequest,
    |                         `- error: cannot find type 'URLRequest' in scope
155 |             eventParser: EventParser,
156 |             timeoutInterval: TimeInterval
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:215:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 |             _ error: Error?,
214 |             stream continuation: AsyncStream<EventType>.Continuation,
215 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
216 |         ) {
217 |             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:235:54: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
    |                                                      `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
236 |         ) {
237 |             guard readyState != .closed else {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:232:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 |
231 |         private func handleSessionResponse(
232 |             _ response: URLResponse,
    |                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             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:234:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 |             _ response: URLResponse,
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
236 |         ) {
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:268:98: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |         /// and sets the `readyState` property to `.closed`.
267 |         /// - Returns: State before closing.
268 |         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.
269 |             let previousState = self.readyState
270 |             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:280:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
278 |             from data: Data,
279 |             stream continuation: AsyncStream<EventType>.Continuation,
280 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
281 |         ) {
282 |             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:319:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
317 |         /// canceling the parent Task only cancels the underlying `URLSessionDataTask` of
318 |         /// ``EventSource/EventSource/DataTask``; this does not actually stop the ongoing request.
319 |         private func cancel(urlSession: URLSession) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
320 |             readyState = .closed
321 |             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:142:57: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
140 |
141 |         private var urlSessionConfiguration: URLSessionConfiguration {
142 |             let configuration = URLSessionConfiguration.default
    |                                                         `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
143 |             configuration.httpAdditionalHeaders = [
144 |                 HTTPHeaderField.accept: Accept.eventStream,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:174:34: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
172 |             return AsyncStream { continuation in
173 |                 let sessionDelegate = SessionDelegate()
174 |                 let urlSession = URLSession(
    |                                  `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
175 |                     configuration: urlSessionConfiguration,
176 |                     delegate: sessionDelegate,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:177:36: error: 'nil' requires a contextual type
175 |                     configuration: urlSessionConfiguration,
176 |                     delegate: sessionDelegate,
177 |                     delegateQueue: nil
    |                                    `- error: 'nil' requires a contextual type
178 |                 )
179 |                 let urlSessionDataTask = urlSession.dataTask(with: urlRequest)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:238:36: error: cannot infer contextual base in reference to member 'cancel'
236 |         ) {
237 |             guard readyState != .closed else {
238 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
239 |                 return
240 |             }
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:242:47: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
240 |             }
241 |
242 |             guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
243 |                 completionHandler(.cancel)
244 |                 return
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:242:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |             }
241 |
242 |             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.
243 |                 completionHandler(.cancel)
244 |                 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:243:36: error: cannot infer contextual base in reference to member 'cancel'
241 |
242 |             guard let httpResponse = response as? HTTPURLResponse else {
243 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
244 |                 return
245 |             }
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:248:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
246 |
247 |             // Stop connection when 204 response code, otherwise keep open
248 |             guard httpResponse.statusCode != 204 else {
    |                                `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
249 |                 completionHandler(.cancel)
250 |                 close(stream: continuation, urlSession: urlSession)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:249:36: error: cannot infer contextual base in reference to member 'cancel'
247 |             // Stop connection when 204 response code, otherwise keep open
248 |             guard httpResponse.statusCode != 204 else {
249 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
250 |                 close(stream: continuation, urlSession: urlSession)
251 |                 return
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:254:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
252 |             }
253 |
254 |             if 200...299 ~= httpResponse.statusCode {
    |                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
255 |                 if readyState != .open {
256 |                     setOpen(stream: continuation)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:259:60: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
257 |                 }
258 |             } else {
259 |                 httpResponseErrorStatusCode = httpResponse.statusCode
    |                                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
260 |             }
261 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:262:32: error: cannot infer contextual base in reference to member 'allow'
260 |             }
261 |
262 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
263 |         }
264 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:322:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
320 |             readyState = .closed
321 |             lastMessageId = ""
322 |             urlSession.invalidateAndCancel()
    |                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
323 |         }
324 |     }
[10/12] Compiling EventSource Data+Trim.swift
[11/12] Compiling EventSource EventParser.swift
[12/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' has 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' has 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
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:062e4aaff76454b333ce7957a8e87c3beb342f1dedb64399abb81cdea021b526
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/10] Compiling EventSource Headers.swift
[3/11] Compiling EventSource Extensions.swift
[4/11] Compiling EventSource EventSourceError.swift
[5/11] Compiling EventSource Mutex.swift
[6/11] Compiling EventSource EventSource.swift
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:61:42: error: cannot find type 'URLRequest' in scope
 59 |     }
 60 |
 61 |     public func dataTask(for urlRequest: URLRequest) -> DataTask {
    |                                          `- error: cannot find type 'URLRequest' in scope
 62 |         DataTask(
 63 |             urlRequest: urlRequest,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:104:32: error: cannot find type 'URLRequest' in scope
102 |
103 |         /// A URLRequest of the events source.
104 |         public let urlRequest: URLRequest
    |                                `- error: cannot find type 'URLRequest' in scope
105 |
106 |         private let _eventParser: Mutex<EventParser>
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:141:46: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |         }
140 |
141 |         private var urlSessionConfiguration: URLSessionConfiguration {
    |                                              `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 |             let configuration = URLSessionConfiguration.default
143 |             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:154:25: error: cannot find type 'URLRequest' in scope
152 |
153 |         internal init(
154 |             urlRequest: URLRequest,
    |                         `- error: cannot find type 'URLRequest' in scope
155 |             eventParser: EventParser,
156 |             timeoutInterval: TimeInterval
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:215:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 |             _ error: Error?,
214 |             stream continuation: AsyncStream<EventType>.Continuation,
215 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
216 |         ) {
217 |             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:235:54: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
    |                                                      `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
236 |         ) {
237 |             guard readyState != .closed else {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:232:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 |
231 |         private func handleSessionResponse(
232 |             _ response: URLResponse,
    |                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             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:234:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 |             _ response: URLResponse,
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
236 |         ) {
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:268:98: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |         /// and sets the `readyState` property to `.closed`.
267 |         /// - Returns: State before closing.
268 |         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.
269 |             let previousState = self.readyState
270 |             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:280:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
278 |             from data: Data,
279 |             stream continuation: AsyncStream<EventType>.Continuation,
280 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
281 |         ) {
282 |             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:319:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
317 |         /// canceling the parent Task only cancels the underlying `URLSessionDataTask` of
318 |         /// ``EventSource/EventSource/DataTask``; this does not actually stop the ongoing request.
319 |         private func cancel(urlSession: URLSession) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
320 |             readyState = .closed
321 |             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:142:57: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
140 |
141 |         private var urlSessionConfiguration: URLSessionConfiguration {
142 |             let configuration = URLSessionConfiguration.default
    |                                                         `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
143 |             configuration.httpAdditionalHeaders = [
144 |                 HTTPHeaderField.accept: Accept.eventStream,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:174:34: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
172 |             return AsyncStream { continuation in
173 |                 let sessionDelegate = SessionDelegate()
174 |                 let urlSession = URLSession(
    |                                  `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
175 |                     configuration: urlSessionConfiguration,
176 |                     delegate: sessionDelegate,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:177:36: error: 'nil' requires a contextual type
175 |                     configuration: urlSessionConfiguration,
176 |                     delegate: sessionDelegate,
177 |                     delegateQueue: nil
    |                                    `- error: 'nil' requires a contextual type
178 |                 )
179 |                 let urlSessionDataTask = urlSession.dataTask(with: urlRequest)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:238:36: error: cannot infer contextual base in reference to member 'cancel'
236 |         ) {
237 |             guard readyState != .closed else {
238 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
239 |                 return
240 |             }
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:242:47: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
240 |             }
241 |
242 |             guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
243 |                 completionHandler(.cancel)
244 |                 return
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:242:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |             }
241 |
242 |             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.
243 |                 completionHandler(.cancel)
244 |                 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:243:36: error: cannot infer contextual base in reference to member 'cancel'
241 |
242 |             guard let httpResponse = response as? HTTPURLResponse else {
243 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
244 |                 return
245 |             }
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:248:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
246 |
247 |             // Stop connection when 204 response code, otherwise keep open
248 |             guard httpResponse.statusCode != 204 else {
    |                                `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
249 |                 completionHandler(.cancel)
250 |                 close(stream: continuation, urlSession: urlSession)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:249:36: error: cannot infer contextual base in reference to member 'cancel'
247 |             // Stop connection when 204 response code, otherwise keep open
248 |             guard httpResponse.statusCode != 204 else {
249 |                 completionHandler(.cancel)
    |                                    `- error: cannot infer contextual base in reference to member 'cancel'
250 |                 close(stream: continuation, urlSession: urlSession)
251 |                 return
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:254:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
252 |             }
253 |
254 |             if 200...299 ~= httpResponse.statusCode {
    |                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
255 |                 if readyState != .open {
256 |                     setOpen(stream: continuation)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:259:60: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
257 |                 }
258 |             } else {
259 |                 httpResponseErrorStatusCode = httpResponse.statusCode
    |                                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
260 |             }
261 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:262:32: error: cannot infer contextual base in reference to member 'allow'
260 |             }
261 |
262 |             completionHandler(.allow)
    |                                `- error: cannot infer contextual base in reference to member 'allow'
263 |         }
264 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:322:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
320 |             readyState = .closed
321 |             lastMessageId = ""
322 |             urlSession.invalidateAndCancel()
    |                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
323 |         }
324 |     }
[7/11] Compiling EventSource ServerEvent.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/11] Compiling EventSource Data+Trim.swift
[9/11] Compiling EventSource EventParser.swift
[10/11] Emitting module EventSource
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:61:42: error: cannot find type 'URLRequest' in scope
 59 |     }
 60 |
 61 |     public func dataTask(for urlRequest: URLRequest) -> DataTask {
    |                                          `- error: cannot find type 'URLRequest' in scope
 62 |         DataTask(
 63 |             urlRequest: urlRequest,
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:104:32: error: cannot find type 'URLRequest' in scope
102 |
103 |         /// A URLRequest of the events source.
104 |         public let urlRequest: URLRequest
    |                                `- error: cannot find type 'URLRequest' in scope
105 |
106 |         private let _eventParser: Mutex<EventParser>
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:141:46: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |         }
140 |
141 |         private var urlSessionConfiguration: URLSessionConfiguration {
    |                                              `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 |             let configuration = URLSessionConfiguration.default
143 |             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:154:25: error: cannot find type 'URLRequest' in scope
152 |
153 |         internal init(
154 |             urlRequest: URLRequest,
    |                         `- error: cannot find type 'URLRequest' in scope
155 |             eventParser: EventParser,
156 |             timeoutInterval: TimeInterval
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:215:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
213 |             _ error: Error?,
214 |             stream continuation: AsyncStream<EventType>.Continuation,
215 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
216 |         ) {
217 |             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:235:54: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
    |                                                      `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
236 |         ) {
237 |             guard readyState != .closed else {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:232:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
230 |
231 |         private func handleSessionResponse(
232 |             _ response: URLResponse,
    |                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             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:234:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 |             _ response: URLResponse,
233 |             stream continuation: AsyncStream<EventType>.Continuation,
234 |             urlSession: URLSession,
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 |             completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
236 |         ) {
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:268:98: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |         /// and sets the `readyState` property to `.closed`.
267 |         /// - Returns: State before closing.
268 |         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.
269 |             let previousState = self.readyState
270 |             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:280:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
278 |             from data: Data,
279 |             stream continuation: AsyncStream<EventType>.Continuation,
280 |             urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
281 |         ) {
282 |             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:319:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
317 |         /// canceling the parent Task only cancels the underlying `URLSessionDataTask` of
318 |         /// ``EventSource/EventSource/DataTask``; this does not actually stop the ongoing request.
319 |         private func cancel(urlSession: URLSession) {
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
320 |             readyState = .closed
321 |             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' has 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' has 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/11] 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' has 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' has 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
BUILD FAILURE 6.1 wasm