The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Featureflip, reference v2.0.0 (839974), with Swift 6.1 for Wasm on 16 Apr 2026 11:10:15 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/canopy-labs/featureflip-swift.git
Reference: v2.0.0
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/canopy-labs/featureflip-swift
 * tag               v2.0.0     -> FETCH_HEAD
HEAD is now at 8399740 Release v2.0.0
Cloned https://github.com/canopy-labs/featureflip-swift.git
Revision (git rev-parse @):
839974002ab83b442ccf39ce15dead49a142c0ae
SUCCESS checkout https://github.com/canopy-labs/featureflip-swift.git at v2.0.0
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/canopy-labs/featureflip-swift.git
https://github.com/canopy-labs/featureflip-swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/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 swiftpackageindex/spi-images
Digest: sha256:276d66a16377d3ee059b2e3429cbc1154d9f01e42871e5d702fd5d8b9044d93d
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/15] Compiling Featureflip FeatureFlag.swift
[4/16] Compiling Featureflip Protocols.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
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/Featureflip/Protocols.swift:8:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
6 | }
7 |
8 | extension URLSession: HTTPDataLoader {}
  | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
9 |
/host/spi-builder-workspace/Sources/Featureflip/SharedFeatureflipCore.swift:79:16: warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 77 |
 78 |     /// Shared date formatter for event timestamps.
 79 |     static let isoFormatter = ISO8601DateFormatter()
    |                |- warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'isoFormatter' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 80 |
 81 |     // MARK: - HTTP / Lifecycle
Foundation.ISO8601DateFormatter:1:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
 1 | open class ISO8601DateFormatter : Formatter, NSSecureCoding {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
 2 |     open var timeZone: TimeZone! { get set }
 3 |     open var formatOptions: ISO8601DateFormatter.Options { get set }
/host/spi-builder-workspace/Sources/Featureflip/SharedFeatureflipCore.swift:487:13: warning: var '_liveCores' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
485 | // MARK: - Module-level cache
486 |
487 | private var _liveCores: [String: SharedFeatureflipCore] = [:]
    |             |- warning: var '_liveCores' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert '_liveCores' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var '_liveCores' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
488 | private let _liveCoresLock = NSLock()
489 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
[5/16] Compiling Featureflip SharedFeatureflipCore.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
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/Featureflip/Protocols.swift:8:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
6 | }
7 |
8 | extension URLSession: HTTPDataLoader {}
  | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
9 |
/host/spi-builder-workspace/Sources/Featureflip/SharedFeatureflipCore.swift:79:16: warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 77 |
 78 |     /// Shared date formatter for event timestamps.
 79 |     static let isoFormatter = ISO8601DateFormatter()
    |                |- warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'isoFormatter' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 80 |
 81 |     // MARK: - HTTP / Lifecycle
Foundation.ISO8601DateFormatter:1:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
 1 | open class ISO8601DateFormatter : Formatter, NSSecureCoding {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
 2 |     open var timeZone: TimeZone! { get set }
 3 |     open var formatOptions: ISO8601DateFormatter.Options { get set }
/host/spi-builder-workspace/Sources/Featureflip/SharedFeatureflipCore.swift:487:13: warning: var '_liveCores' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
485 | // MARK: - Module-level cache
486 |
487 | private var _liveCores: [String: SharedFeatureflipCore] = [:]
    |             |- warning: var '_liveCores' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert '_liveCores' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var '_liveCores' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
488 | private let _liveCoresLock = NSLock()
489 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
[6/16] Compiling Featureflip StreamingDataSource.swift
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:115:18: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
113 |     private func connectLoop() async {
114 |         while !Task.isCancelled {
115 |             lock.lock()
    |                  `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
116 |             let currentRetryCount = retryCount
117 |             let currentBackoff = backoff
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:118:18: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
116 |             let currentRetryCount = retryCount
117 |             let currentBackoff = backoff
118 |             lock.unlock()
    |                  `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
119 |
120 |             guard currentRetryCount < Self.maxRetries else { return }
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:128:18: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
126 |             }
127 |
128 |             lock.lock()
    |                  `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
129 |             retryCount += 1
130 |             lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:130:18: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
128 |             lock.lock()
129 |             retryCount += 1
130 |             lock.unlock()
    |                  `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
131 |
132 |             try? await Task.sleep(nanoseconds: UInt64(currentBackoff * 1_000_000_000))
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:134:18: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
132 |             try? await Task.sleep(nanoseconds: UInt64(currentBackoff * 1_000_000_000))
133 |
134 |             lock.lock()
    |                  `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
135 |             backoff = Self.nextBackoff(backoff)
136 |             lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:136:18: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
134 |             lock.lock()
135 |             backoff = Self.nextBackoff(backoff)
136 |             lock.unlock()
    |                  `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
137 |         }
138 |     }
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:141:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
139 |
140 |     private func connect() async throws {
141 |         lock.lock()
    |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
142 |         let currentContext = context
143 |         lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:143:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
141 |         lock.lock()
142 |         let currentContext = context
143 |         lock.unlock()
    |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
144 |
145 |         guard let url = Self.buildStreamURL(baseUrl: baseUrl, clientKey: clientKey, context: currentContext) else { return }
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:146:23: error: cannot find 'URLRequest' in scope
144 |
145 |         guard let url = Self.buildStreamURL(baseUrl: baseUrl, clientKey: clientKey, context: currentContext) else { return }
146 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
147 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
148 |
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:149:54: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
147 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
148 |
149 |         let (bytes, response) = try await URLSession.shared.bytes(for: request)
    |                                                      `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
150 |         guard let http = response as? HTTPURLResponse, http.statusCode == 200 else { return }
151 |
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:153:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
151 |
152 |         // Reset backoff on successful connection
153 |         lock.lock()
    |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
154 |         backoff = Self.initialBackoff
155 |         retryCount = 0
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:156:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
154 |         backoff = Self.initialBackoff
155 |         retryCount = 0
156 |         lock.unlock()
    |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
157 |
158 |         var lineBuffer: [String] = []
[7/16] Compiling Featureflip HttpClient.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:57:70: error: cannot find type 'URLRequest' in scope
55 |     }
56 |
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
   |                                                                      `- error: cannot find type 'URLRequest' in scope
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:35:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 |         let (_, response) = try await loader.data(for: request)
34 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
35 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
36 |             throw Error.httpError(statusCode: code)
37 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:51:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 |         let (responseData, response) = try await loader.data(for: request)
50 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
51 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 |             throw Error.httpError(statusCode: code)
53 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:59:23: error: cannot find 'URLRequest' in scope
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
60 |         request.httpMethod = method
61 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Featureflip/LifecycleObserver.swift:28:29: error: cannot find 'NotificationCenter' in scope
26 |
27 |     deinit {
28 |         observers.forEach { NotificationCenter.default.removeObserver($0) }
   |                             `- error: cannot find 'NotificationCenter' in scope
29 |     }
30 |
[8/16] Compiling Featureflip LifecycleObserver.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:57:70: error: cannot find type 'URLRequest' in scope
55 |     }
56 |
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
   |                                                                      `- error: cannot find type 'URLRequest' in scope
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:35:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 |         let (_, response) = try await loader.data(for: request)
34 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
35 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
36 |             throw Error.httpError(statusCode: code)
37 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:51:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 |         let (responseData, response) = try await loader.data(for: request)
50 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
51 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 |             throw Error.httpError(statusCode: code)
53 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:59:23: error: cannot find 'URLRequest' in scope
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
60 |         request.httpMethod = method
61 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Featureflip/LifecycleObserver.swift:28:29: error: cannot find 'NotificationCenter' in scope
26 |
27 |     deinit {
28 |         observers.forEach { NotificationCenter.default.removeObserver($0) }
   |                             `- error: cannot find 'NotificationCenter' in scope
29 |     }
30 |
[9/16] Compiling Featureflip Models.swift
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:49:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
47 |
48 |     func pollOnce() async {
49 |         lock.lock()
   |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
50 |         let currentContext = context
51 |         lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:51:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
49 |         lock.lock()
50 |         let currentContext = context
51 |         lock.unlock()
   |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
52 |         do {
53 |             let result = try await httpClient.evaluate(context: currentContext)
[10/16] Compiling Featureflip PollingDataSource.swift
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:49:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
47 |
48 |     func pollOnce() async {
49 |         lock.lock()
   |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
50 |         let currentContext = context
51 |         lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:51:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
49 |         lock.lock()
50 |         let currentContext = context
51 |         lock.unlock()
   |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
52 |         do {
53 |             let result = try await httpClient.evaluate(context: currentContext)
error: emit-module command failed with exit code 1 (use -v to see invocation)
[11/16] Emitting module Featureflip
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:57:70: error: cannot find type 'URLRequest' in scope
55 |     }
56 |
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
   |                                                                      `- error: cannot find type 'URLRequest' in scope
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
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/Featureflip/Protocols.swift:8:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
6 | }
7 |
8 | extension URLSession: HTTPDataLoader {}
  | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
9 |
/host/spi-builder-workspace/Sources/Featureflip/SharedFeatureflipCore.swift:79:16: warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 77 |
 78 |     /// Shared date formatter for event timestamps.
 79 |     static let isoFormatter = ISO8601DateFormatter()
    |                |- warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'isoFormatter' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 80 |
 81 |     // MARK: - HTTP / Lifecycle
Foundation.ISO8601DateFormatter:1:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
 1 | open class ISO8601DateFormatter : Formatter, NSSecureCoding {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
 2 |     open var timeZone: TimeZone! { get set }
 3 |     open var formatOptions: ISO8601DateFormatter.Options { get set }
/host/spi-builder-workspace/Sources/Featureflip/SharedFeatureflipCore.swift:487:13: warning: var '_liveCores' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
485 | // MARK: - Module-level cache
486 |
487 | private var _liveCores: [String: SharedFeatureflipCore] = [:]
    |             |- warning: var '_liveCores' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert '_liveCores' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: add '@MainActor' to make var '_liveCores' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
488 | private let _liveCoresLock = NSLock()
489 |
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:8:6: error: unknown attribute 'Published'
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
 8 |     @Published public private(set) var revision: UInt = 0
   |      `- error: unknown attribute 'Published'
 9 |     private let client: FeatureflipClient
10 |
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:7:41: error: cannot find type 'ObservableObject' in scope
 5 |
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
   |                                         `- error: cannot find type 'ObservableObject' in scope
 8 |     @Published public private(set) var revision: UInt = 0
 9 |     private let client: FeatureflipClient
[12/16] Compiling Featureflip EventProcessor.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
[13/16] Compiling Featureflip FeatureflipClient.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
[14/16] Compiling Featureflip FeatureFlagProvider.swift
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:8:6: error: unknown attribute 'Published'
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
 8 |     @Published public private(set) var revision: UInt = 0
   |      `- error: unknown attribute 'Published'
 9 |     private let client: FeatureflipClient
10 |
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:7:41: error: cannot find type 'ObservableObject' in scope
 5 |
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
   |                                         `- error: cannot find type 'ObservableObject' in scope
 8 |     @Published public private(set) var revision: UInt = 0
 9 |     private let client: FeatureflipClient
[15/16] Compiling Featureflip FeatureflipConfig.swift
[16/16] Compiling Featureflip FlagCache.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:276d66a16377d3ee059b2e3429cbc1154d9f01e42871e5d702fd5d8b9044d93d
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/14] Compiling Featureflip FeatureFlag.swift
[3/15] Compiling Featureflip StreamingDataSource.swift
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:115:18: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
113 |     private func connectLoop() async {
114 |         while !Task.isCancelled {
115 |             lock.lock()
    |                  `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
116 |             let currentRetryCount = retryCount
117 |             let currentBackoff = backoff
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:118:18: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
116 |             let currentRetryCount = retryCount
117 |             let currentBackoff = backoff
118 |             lock.unlock()
    |                  `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
119 |
120 |             guard currentRetryCount < Self.maxRetries else { return }
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:128:18: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
126 |             }
127 |
128 |             lock.lock()
    |                  `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
129 |             retryCount += 1
130 |             lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:130:18: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
128 |             lock.lock()
129 |             retryCount += 1
130 |             lock.unlock()
    |                  `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
131 |
132 |             try? await Task.sleep(nanoseconds: UInt64(currentBackoff * 1_000_000_000))
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:134:18: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
132 |             try? await Task.sleep(nanoseconds: UInt64(currentBackoff * 1_000_000_000))
133 |
134 |             lock.lock()
    |                  `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
135 |             backoff = Self.nextBackoff(backoff)
136 |             lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:136:18: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
134 |             lock.lock()
135 |             backoff = Self.nextBackoff(backoff)
136 |             lock.unlock()
    |                  `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
137 |         }
138 |     }
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:141:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
139 |
140 |     private func connect() async throws {
141 |         lock.lock()
    |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
142 |         let currentContext = context
143 |         lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:143:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
141 |         lock.lock()
142 |         let currentContext = context
143 |         lock.unlock()
    |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
144 |
145 |         guard let url = Self.buildStreamURL(baseUrl: baseUrl, clientKey: clientKey, context: currentContext) else { return }
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:146:23: error: cannot find 'URLRequest' in scope
144 |
145 |         guard let url = Self.buildStreamURL(baseUrl: baseUrl, clientKey: clientKey, context: currentContext) else { return }
146 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
147 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
148 |
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:149:54: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
147 |         request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
148 |
149 |         let (bytes, response) = try await URLSession.shared.bytes(for: request)
    |                                                      `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
150 |         guard let http = response as? HTTPURLResponse, http.statusCode == 200 else { return }
151 |
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:153:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
151 |
152 |         // Reset backoff on successful connection
153 |         lock.lock()
    |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
154 |         backoff = Self.initialBackoff
155 |         retryCount = 0
/host/spi-builder-workspace/Sources/Featureflip/StreamingDataSource.swift:156:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
154 |         backoff = Self.initialBackoff
155 |         retryCount = 0
156 |         lock.unlock()
    |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
157 |
158 |         var lineBuffer: [String] = []
[4/15] Compiling Featureflip Protocols.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
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/Featureflip/Protocols.swift:8:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
6 | }
7 |
8 | extension URLSession: HTTPDataLoader {}
  | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
9 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
[5/15] Compiling Featureflip SharedFeatureflipCore.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
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/Featureflip/Protocols.swift:8:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
6 | }
7 |
8 | extension URLSession: HTTPDataLoader {}
  | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
9 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/15] Emitting module Featureflip
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:57:70: error: cannot find type 'URLRequest' in scope
55 |     }
56 |
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
   |                                                                      `- error: cannot find type 'URLRequest' in scope
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
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/Featureflip/Protocols.swift:8:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
6 | }
7 |
8 | extension URLSession: HTTPDataLoader {}
  | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
9 |
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:8:6: error: unknown attribute 'Published'
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
 8 |     @Published public private(set) var revision: UInt = 0
   |      `- error: unknown attribute 'Published'
 9 |     private let client: FeatureflipClient
10 |
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:7:41: error: cannot find type 'ObservableObject' in scope
 5 |
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
   |                                         `- error: cannot find type 'ObservableObject' in scope
 8 |     @Published public private(set) var revision: UInt = 0
 9 |     private let client: FeatureflipClient
[7/15] Compiling Featureflip FeatureflipConfig.swift
[8/15] Compiling Featureflip FlagCache.swift
[9/15] Compiling Featureflip FeatureFlagProvider.swift
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:8:6: error: unknown attribute 'Published'
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
 8 |     @Published public private(set) var revision: UInt = 0
   |      `- error: unknown attribute 'Published'
 9 |     private let client: FeatureflipClient
10 |
/host/spi-builder-workspace/Sources/Featureflip/SwiftUI/FeatureFlagProvider.swift:7:41: error: cannot find type 'ObservableObject' in scope
 5 |
 6 | /// Observable provider for SwiftUI views that need reactive flag updates.
 7 | public final class FeatureFlagProvider: ObservableObject {
   |                                         `- error: cannot find type 'ObservableObject' in scope
 8 |     @Published public private(set) var revision: UInt = 0
 9 |     private let client: FeatureflipClient
[10/15] Compiling Featureflip Models.swift
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:49:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
47 |
48 |     func pollOnce() async {
49 |         lock.lock()
   |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
50 |         let currentContext = context
51 |         lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:51:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
49 |         lock.lock()
50 |         let currentContext = context
51 |         lock.unlock()
   |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
52 |         do {
53 |             let result = try await httpClient.evaluate(context: currentContext)
[11/15] Compiling Featureflip PollingDataSource.swift
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:49:14: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
47 |
48 |     func pollOnce() async {
49 |         lock.lock()
   |              `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
50 |         let currentContext = context
51 |         lock.unlock()
/host/spi-builder-workspace/Sources/Featureflip/PollingDataSource.swift:51:14: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
49 |         lock.lock()
50 |         let currentContext = context
51 |         lock.unlock()
   |              `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode; this is an error in the Swift 6 language mode
52 |         do {
53 |             let result = try await httpClient.evaluate(context: currentContext)
[12/15] Compiling Featureflip HttpClient.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:57:70: error: cannot find type 'URLRequest' in scope
55 |     }
56 |
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
   |                                                                      `- error: cannot find type 'URLRequest' in scope
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:35:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 |         let (_, response) = try await loader.data(for: request)
34 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
35 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
36 |             throw Error.httpError(statusCode: code)
37 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:51:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 |         let (responseData, response) = try await loader.data(for: request)
50 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
51 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 |             throw Error.httpError(statusCode: code)
53 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:59:23: error: cannot find 'URLRequest' in scope
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
60 |         request.httpMethod = method
61 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Featureflip/LifecycleObserver.swift:28:29: error: cannot find 'NotificationCenter' in scope
26 |
27 |     deinit {
28 |         observers.forEach { NotificationCenter.default.removeObserver($0) }
   |                             `- error: cannot find 'NotificationCenter' in scope
29 |     }
30 |
[13/15] Compiling Featureflip LifecycleObserver.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:14:82: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
12 |     private let loader: HTTPDataLoader
13 |
14 |     init(baseUrl: String, clientKey: String, loader: HTTPDataLoader = URLSession.shared) {
   |                                                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
15 |         self.baseUrl = baseUrl
16 |         self.clientKey = clientKey
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:57:70: error: cannot find type 'URLRequest' in scope
55 |     }
56 |
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
   |                                                                      `- error: cannot find type 'URLRequest' in scope
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:35:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
33 |         let (_, response) = try await loader.data(for: request)
34 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
35 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
36 |             throw Error.httpError(statusCode: code)
37 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:51:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 |         let (responseData, response) = try await loader.data(for: request)
50 |         guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
51 |             let code = (response as? HTTPURLResponse)?.statusCode ?? 0
   |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 |             throw Error.httpError(statusCode: code)
53 |         }
/host/spi-builder-workspace/Sources/Featureflip/HttpClient.swift:59:23: error: cannot find 'URLRequest' in scope
57 |     private func makeRequest(path: String, method: String) throws -> URLRequest {
58 |         guard let url = URL(string: baseUrl + path) else { throw Error.invalidURL }
59 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
60 |         request.httpMethod = method
61 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Featureflip/LifecycleObserver.swift:28:29: error: cannot find 'NotificationCenter' in scope
26 |
27 |     deinit {
28 |         observers.forEach { NotificationCenter.default.removeObserver($0) }
   |                             `- error: cannot find 'NotificationCenter' in scope
29 |     }
30 |
[14/15] Compiling Featureflip EventProcessor.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
[15/15] Compiling Featureflip FeatureflipClient.swift
/host/spi-builder-workspace/Sources/Featureflip/Protocols.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// Abstraction over URLSession for testability.
4 | protocol HTTPDataLoader: Sendable {
5 |     func data(for request: URLRequest) async throws -> (Data, URLResponse)
  |                            `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
BUILD FAILURE 6.1 wasm