The Swift Package Index logo.Swift Package Index

Build Information

Failed to build GameAnalyticsSDK, reference main (5b187f), with Swift 6.1 for Wasm on 14 Jul 2026 20:11:08 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: e8bafa5c5d5b3cc8a20258ddf060ad6c89f46bf9
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/THSoftware/GameAnalyticsSDK.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/THSoftware/GameAnalyticsSDK
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 5b187f1 Add MIT LICENSE file
Cloned https://github.com/THSoftware/GameAnalyticsSDK.git
Revision (git rev-parse @):
5b187f175b336e1ee34c0b40760feb50ac2349a9
SUCCESS checkout https://github.com/THSoftware/GameAnalyticsSDK.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/THSoftware/GameAnalyticsSDK.git
https://github.com/THSoftware/GameAnalyticsSDK.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886770-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:1ad245dad3d2ae0004e1afbc92334bd39884ed9ca587cf04d0a8d5f640fb02e9
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/7] Compiling GameAnalyticsSDK Models.swift
[4/7] Compiling GameAnalyticsSDK APIClient.swift
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/APIClient.swift:11:23: error: cannot find 'URLRequest' in scope
 9 |         let payload = IngestPayload(apiKey: apiKey, events: events)
10 |
11 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
12 |         request.httpMethod = "POST"
13 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/APIClient.swift:17:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         request.timeoutInterval = 10
16 |
17 |         let (_, response) = try await URLSession.shared.data(for: request)
   |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
18 |
19 |         guard let http = response as? HTTPURLResponse,
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/APIClient.swift:21:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
19 |         guard let http = response as? HTTPURLResponse,
20 |               (200...299).contains(http.statusCode) else {
21 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 |             throw APIError.badResponse(code)
23 |         }
[5/7] Emitting module GameAnalyticsSDK
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:19:24: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'GameAnalytics' may have shared mutable state; this is an error in the Swift 6 language mode
 16 | /// GameAnalytics.track("power_up_collected", properties: ["type": "shield"])
 17 | /// ```
 18 | public final class GameAnalytics {
    |                    `- note: class 'GameAnalytics' does not conform to the 'Sendable' protocol
 19 |     private static let shared = GameAnalytics()
    |                        |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'GameAnalytics' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 20 |
 21 |     private var apiKey: String?
[6/7] Compiling GameAnalyticsSDK EventQueue.swift
[7/7] Compiling GameAnalyticsSDK GameAnalytics.swift
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:19:24: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'GameAnalytics' may have shared mutable state; this is an error in the Swift 6 language mode
 16 | /// GameAnalytics.track("power_up_collected", properties: ["type": "shield"])
 17 | /// ```
 18 | public final class GameAnalytics {
    |                    `- note: class 'GameAnalytics' does not conform to the 'Sendable' protocol
 19 |     private static let shared = GameAnalytics()
    |                        |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'GameAnalytics' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 20 |
 21 |     private var apiKey: String?
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:118:34: warning: non-sendable result type '[AnalyticsEvent]' cannot be sent from actor-isolated context in call to instance method 'dequeue(max:)'; this is an error in the Swift 6 language mode
116 |     private func flush() async {
117 |         guard let apiKey, let ingestURL else { return }
118 |         let events = await queue.dequeue(max: 50)
    |                                  `- warning: non-sendable result type '[AnalyticsEvent]' cannot be sent from actor-isolated context in call to instance method 'dequeue(max:)'; this is an error in the Swift 6 language mode
119 |         guard !events.isEmpty else { return }
120 |
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/Models.swift:33:8: note: consider making struct 'AnalyticsEvent' conform to the 'Sendable' protocol
31 | }
32 |
33 | struct AnalyticsEvent: Encodable {
   |        `- note: consider making struct 'AnalyticsEvent' conform to the 'Sendable' protocol
34 |     let playerId: String
35 |     let type: String
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:96:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 94 |     private func startFlushTimer() {
 95 |         flushTask?.cancel()
 96 |         flushTask = Task { [weak self] in
    |                          `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 97 |             while !Task.isCancelled {
 98 |                 try? await Task.sleep(nanoseconds: 30_000_000_000)
 99 |                 await self?.flush()
    |                       `- note: closure captures 'self' which is accessible to code in the current task
100 |             }
101 |         }
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:58:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 56 |             properties: properties
 57 |         )
 58 |         Task { await shared.queue.enqueue(event) }
    |              |                            `- note: closure captures 'event' which is accessible to code in the current task
    |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 59 |     }
 60 |
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:58:35: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
 56 |             properties: properties
 57 |         )
 58 |         Task { await shared.queue.enqueue(event) }
    |                                   |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
    |                                   `- note: sending task-isolated 'event' to actor-isolated instance method 'enqueue' risks causing data races between actor-isolated and task-isolated uses
 59 |     }
 60 |
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/GameAnalytics.swift:124:25: warning: sending 'events' risks causing data races; this is an error in the Swift 6 language mode
122 |             try await client.send(events: events, apiKey: apiKey, to: ingestURL)
123 |         } catch {
124 |             await queue.requeue(events)
    |                         |- warning: sending 'events' risks causing data races; this is an error in the Swift 6 language mode
    |                         `- note: sending 'self.queue'-isolated 'events' to actor-isolated instance method 'requeue' risks causing data races between actor-isolated and 'self.queue'-isolated uses
125 |         }
126 |     }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886770-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:1ad245dad3d2ae0004e1afbc92334bd39884ed9ca587cf04d0a8d5f640fb02e9
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/6] Compiling GameAnalyticsSDK EventQueue.swift
[3/6] Compiling GameAnalyticsSDK Models.swift
[4/6] Emitting module GameAnalyticsSDK
[5/6] Compiling GameAnalyticsSDK GameAnalytics.swift
[6/6] Compiling GameAnalyticsSDK APIClient.swift
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/APIClient.swift:11:23: error: cannot find 'URLRequest' in scope
 9 |         let payload = IngestPayload(apiKey: apiKey, events: events)
10 |
11 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
12 |         request.httpMethod = "POST"
13 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/APIClient.swift:17:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         request.timeoutInterval = 10
16 |
17 |         let (_, response) = try await URLSession.shared.data(for: request)
   |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
18 |
19 |         guard let http = response as? HTTPURLResponse,
/host/spi-builder-workspace/Sources/GameAnalyticsSDK/APIClient.swift:21:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
19 |         guard let http = response as? HTTPURLResponse,
20 |               (200...299).contains(http.statusCode) else {
21 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
22 |             throw APIError.badResponse(code)
23 |         }
BUILD FAILURE 6.1 wasm