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 (1e6165), with Swift 6.1 for Wasm on 31 Oct 2025 15:30:36 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-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/mattt/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/mattt/EventSource
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 1e61651 Update integration test to give the connection task a chance to start (#16)
Cloned https://github.com/mattt/EventSource.git
Revision (git rev-parse @):
1e6165100aa69c4ecbd9df033845d33030cd9ca6
SUCCESS checkout https://github.com/mattt/EventSource.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/mattt/EventSource.git
https://github.com/mattt/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" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "15.0"
    },
    {
      "name" : "watchos",
      "version" : "8.0"
    },
    {
      "name" : "tvos",
      "version" : "15.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" : [
        "AsyncEventsSequenceTests.swift",
        "Helpers/AsyncBytes.swift",
        "Helpers/ChunkedAsyncBytes.swift",
        "Helpers/MockURLProtocol.swift",
        "IntegrationTests.swift",
        "ParserTests.swift"
      ],
      "target_dependencies" : [
        "EventSource"
      ],
      "type" : "test"
    },
    {
      "c99name" : "EventSource",
      "module_type" : "SwiftTarget",
      "name" : "EventSource",
      "path" : "Sources/EventSource",
      "product_memberships" : [
        "EventSource"
      ],
      "sources" : [
        "AsyncEventsSequence.swift",
        "AsyncSequence+Events.swift",
        "EventSource.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "6.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-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
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Compiling EventSource AsyncSequence+Events.swift
[4/6] Compiling EventSource AsyncEventsSequence.swift
[5/6] Emitting module EventSource
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:346:25: error: cannot find type 'URLRequest' in scope
344 |
345 |     /// The request used for the event source connection.
346 |     public let request: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
347 |
348 |     /// The URL session for the event source connection.
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:349:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
347 |
348 |     /// The URL session for the event source connection.
349 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
350 |
351 |     /// The task managing the connection loop.
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:483:18: error: cannot find type 'URLRequest' in scope
481 |     ///                    Defaults to `.default`.
482 |     public init(
483 |         request: URLRequest,
    |                  `- error: cannot find type 'URLRequest' in scope
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:484:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
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:484:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:467:23: error: cannot find 'URLRequest' in scope
465 |     /// - Parameter url: The URL to open the SSE connection to.
466 |     public init(url: URL) {
467 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:470:18: error: incorrect argument label in call (have 'request:', expected 'url:')
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
470 |         self.init(request: request)
    |                  `- error: incorrect argument label in call (have 'request:', expected 'url:')
471 |     }
472 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:486:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
487 |         self.request = request
488 |         Task { [weak self] in
[6/6] Compiling EventSource EventSource.swift
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:346:25: error: cannot find type 'URLRequest' in scope
344 |
345 |     /// The request used for the event source connection.
346 |     public let request: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
347 |
348 |     /// The URL session for the event source connection.
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:349:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
347 |
348 |     /// The URL session for the event source connection.
349 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
350 |
351 |     /// The task managing the connection loop.
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:483:18: error: cannot find type 'URLRequest' in scope
481 |     ///                    Defaults to `.default`.
482 |     public init(
483 |         request: URLRequest,
    |                  `- error: cannot find type 'URLRequest' in scope
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:484:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
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:484:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:467:23: error: cannot find 'URLRequest' in scope
465 |     /// - Parameter url: The URL to open the SSE connection to.
466 |     public init(url: URL) {
467 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:470:18: error: incorrect argument label in call (have 'request:', expected 'url:')
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
470 |         self.init(request: request)
    |                  `- error: incorrect argument label in call (have 'request:', expected 'url:')
471 |     }
472 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:486:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
487 |         self.request = request
488 |         Task { [weak self] in
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:562:68: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
560 |                 #else
561 |                     // Apple platforms: Use URLSession.bytes for true streaming
562 |                     let (byteStream, response) = try await session.bytes(
    |                                                                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
563 |                         for: currentRequest,
564 |                         delegate: nil
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:564:35: error: 'nil' requires a contextual type
562 |                     let (byteStream, response) = try await session.bytes(
563 |                         for: currentRequest,
564 |                         delegate: nil
    |                                   `- error: 'nil' requires a contextual type
565 |                     )
566 |
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-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
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/5] Compiling EventSource AsyncSequence+Events.swift
[3/5] Compiling EventSource AsyncEventsSequence.swift
[4/5] Emitting module EventSource
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:346:25: error: cannot find type 'URLRequest' in scope
344 |
345 |     /// The request used for the event source connection.
346 |     public let request: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
347 |
348 |     /// The URL session for the event source connection.
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:349:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
347 |
348 |     /// The URL session for the event source connection.
349 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
350 |
351 |     /// The task managing the connection loop.
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:483:18: error: cannot find type 'URLRequest' in scope
481 |     ///                    Defaults to `.default`.
482 |     public init(
483 |         request: URLRequest,
    |                  `- error: cannot find type 'URLRequest' in scope
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:484:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
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:484:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:467:23: error: cannot find 'URLRequest' in scope
465 |     /// - Parameter url: The URL to open the SSE connection to.
466 |     public init(url: URL) {
467 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:470:18: error: incorrect argument label in call (have 'request:', expected 'url:')
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
470 |         self.init(request: request)
    |                  `- error: incorrect argument label in call (have 'request:', expected 'url:')
471 |     }
472 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:486:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
487 |         self.request = request
488 |         Task { [weak self] in
[5/5] Compiling EventSource EventSource.swift
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:346:25: error: cannot find type 'URLRequest' in scope
344 |
345 |     /// The request used for the event source connection.
346 |     public let request: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
347 |
348 |     /// The URL session for the event source connection.
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:349:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
347 |
348 |     /// The URL session for the event source connection.
349 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
350 |
351 |     /// The task managing the connection loop.
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:483:18: error: cannot find type 'URLRequest' in scope
481 |     ///                    Defaults to `.default`.
482 |     public init(
483 |         request: URLRequest,
    |                  `- error: cannot find type 'URLRequest' in scope
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:484:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
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:484:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
482 |     public init(
483 |         request: URLRequest,
484 |         configuration: URLSessionConfiguration = .default
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:467:23: error: cannot find 'URLRequest' in scope
465 |     /// - Parameter url: The URL to open the SSE connection to.
466 |     public init(url: URL) {
467 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:470:18: error: incorrect argument label in call (have 'request:', expected 'url:')
468 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
469 |         request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
470 |         self.init(request: request)
    |                  `- error: incorrect argument label in call (have 'request:', expected 'url:')
471 |     }
472 |
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:486:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
484 |         configuration: URLSessionConfiguration = .default
485 |     ) {
486 |         self.session = URLSession(configuration: configuration)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
487 |         self.request = request
488 |         Task { [weak self] in
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:562:68: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
560 |                 #else
561 |                     // Apple platforms: Use URLSession.bytes for true streaming
562 |                     let (byteStream, response) = try await session.bytes(
    |                                                                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
563 |                         for: currentRequest,
564 |                         delegate: nil
/host/spi-builder-workspace/Sources/EventSource/EventSource.swift:564:35: error: 'nil' requires a contextual type
562 |                     let (byteStream, response) = try await session.bytes(
563 |                         for: currentRequest,
564 |                         delegate: nil
    |                                   `- error: 'nil' requires a contextual type
565 |                     )
566 |
BUILD FAILURE 6.1 wasm