Build Information
Failed to build CodexKit, reference main (f7fa39), with Swift 6.4 for visionOS using Xcode 27.0 on 26 Sep 2026 22:51:03 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$PWD/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $PWD/.derivedData build -scheme CodexKit-Package -destination generic/platform=xrOSBuild Log
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks -rename /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule.swiftsourceinfo /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/DequeModule.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo
SwiftDriver AsyncAlgorithms normal arm64 com.apple.xcode.tools.swift.compiler (in target 'AsyncAlgorithms' from project 'swift-async-algorithms')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftDriver -- /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -parse-as-library -module-name AsyncAlgorithms -Onone @/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/Objects-normal/arm64/AsyncAlgorithms.SwiftFileList -DSWIFT_PACKAGE -DDEBUG -DSWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -DXcode -enable-experimental-feature AvailabilityMacro\=AsyncAlgorithms\ 1.0:macOS\ 10.15,\ iOS\ 13.0,\ tvOS\ 13.0,\ watchOS\ 6.0 -enable-experimental-feature AvailabilityMacro\=AsyncAlgorithms\ 1.1:macOS\ 15.0,\ iOS\ 18.0,\ tvOS\ 18.0,\ watchOS\ 11.0,\ visionOS\ 2.0 -enable-experimental-feature AvailabilityMacro\=AsyncAlgorithms\ 1.2:macOS\ 15.0,\ iOS\ 18.0,\ tvOS\ 18.0,\ watchOS\ 11.0,\ visionOS\ 2.0 -enable-experimental-feature AvailabilityMacro\=AsyncAlgorithms\ 1.3:macOS\ 15.0,\ iOS\ 18.0,\ tvOS\ 18.0,\ watchOS\ 11.0,\ visionOS\ 2.0 -enable-experimental-feature StrictConcurrency\=complete -plugin-path /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing -enable-experimental-feature DebugDescriptionMacro -sdk /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk -target arm64-apple-xros1.0 -g -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -suppress-warnings -index-store-path /Users/admin/builder/spi-builder-workspace/.derivedData/Index.noindex/DataStore -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -swift-version 6 -I /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros -Isystem /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/lib -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/PackageFrameworks -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/Library/Frameworks -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk/Developer/Library/Frameworks -c -j10 -enable-batch-mode -incremental -Xcc -ivfsstatcache -Xcc /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/xros27.0-24M361-e829b21a6f8c9b70876ba0858053c044735bd543db762f57723cac368afd1ce4.sdkstatcache -output-file-map /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/Objects-normal/arm64/AsyncAlgorithms-OutputFileMap.json -save-temps -no-color-diagnostics -explicit-module-build -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -clang-scanner-module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex -sdk-module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules -emit-dependencies -emit-module -emit-module-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/Objects-normal/arm64/AsyncAlgorithms.swiftmodule -serialize-diagnostics -dependency-scan-serialize-diagnostics-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/Objects-normal/arm64/AsyncAlgorithms-dependency-scan.dia -user-module-version 1.1.6 -validate-clang-modules-once -clang-build-session-file /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -package-name swift_async_algorithms -emit-const-values -const-gather-protocols-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/Objects-normal/arm64/AsyncAlgorithms_const_extract_protocols.json -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/include -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/DerivedSources-normal/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/DerivedSources/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-async-algorithms.build/Debug-xros/AsyncAlgorithms-t.build/Objects-normal/arm64/AsyncAlgorithms-Swift.h -working-directory /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -experimental-emit-module-separately -disable-cmo
Ld /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/DequeModule.o normal (in target 'DequeModule' from project 'swift-collections')
cd /Users/admin/builder/spi-builder-workspace/.dependencies/checkouts/swift-collections
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-xros1.0 -r -isysroot /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk -O0 -w -Xlinker -no_warn_duplicate_libraries -F/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-xros -F/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/PackageFrameworks -F/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros -iframework /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/Library/Frameworks -iframework /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk/Developer/Library/Frameworks -filelist /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule.LinkFileList -nostdlib -Xlinker -object_path_lto -Xlinker /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule_lto.o -Xlinker -no_deduplicate -Xlinker -debug_variant -Xlinker -dependency_info -Xlinker /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule_dependency_info.dat -fobjc-link-runtime -L/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/xros -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule.swiftmodule -o /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/DequeModule.o
ExtractAppIntentsMetadata (in target 'DequeModule' from project 'swift-collections')
cd /Users/admin/builder/spi-builder-workspace/.dependencies/checkouts/swift-collections
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/appintentsmetadataprocessor --toolchain-dir /var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v27.1.266.1.vpSNIy/Metal.xctoolchain --module-name DequeModule --sdk-root /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk --xcode-version 27A266a --platform-family xrOS --deployment-target 1.0 --bundle-identifier swift-collections.DequeModule --output /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/DequeModule.appintents --target-triple arm64-apple-xros1.0 --binary-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/DequeModule.o --dependency-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule_dependency_info.dat --stringsdata-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata --source-file-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule.SwiftFileList --metadata-file-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/DequeModule.DependencyMetadataFileList --static-metadata-file-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/DequeModule.DependencyStaticMetadataFileList --swift-const-vals-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/swift-collections.build/Debug-xros/DequeModule-t.build/Objects-normal/arm64/DequeModule.SwiftConstValuesFileList --force --compile-time-extraction --deployment-aware-processing --no-app-shortcuts-localization
2026-09-26 18:51:02.977 appintentsmetadataprocessor[914:5344] Starting appintentsmetadataprocessor export
2026-09-26 18:51:03.057 appintentsmetadataprocessor[914:5344] Extracted no relevant App Intents symbols, skipping writing output
SwiftCompile normal arm64 Compiling\ AccountEventHub.swift,\ AppServerClient.swift,\ AppServerConnection.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerClient.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerConnection.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:295:25: error: 'Mutex' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
293 | }
294 |
295 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
296 |
297 | var isFinished: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:295:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
293 | }
294 |
295 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
296 |
297 | var isFinished: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:122:25: error: 'Mutex' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
120 | }
121 |
122 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
123 |
124 | func yield(_ event: CodexAccountEvent) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:122:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
120 | }
121 |
122 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
123 |
124 | func yield(_ event: CodexAccountEvent) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:262:25: error: 'Mutex' is only available in visionOS 2.0 or newer
255 | }
256 |
257 | private final class AccountEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
258 | private struct State {
259 | var isCancelled = false
260 | }
261 |
262 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
263 | private let id: UUID
264 | private let registry: AccountEventSubscriptionRegistry
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:262:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
255 | }
256 |
257 | private final class AccountEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
258 | private struct State {
259 | var isCancelled = false
260 | }
261 |
262 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
263 | private let id: UUID
264 | private let registry: AccountEventSubscriptionRegistry
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:125:28: error: 'withLock' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
122 | private let state = Mutex(State())
123 |
124 | func yield(_ event: CodexAccountEvent) {
| `- note: add '@available' attribute to enclosing instance method
125 | let waiter = state.withLock { state -> CheckedContinuation<
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
126 | Result<CodexAccountEvent?, CodexAppServerError>, Never
127 | >? in
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:156:42: error: 'withLock' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
149 | }
150 |
151 | func next(
| `- note: add '@available' attribute to enclosing instance method
152 | cancellation: AccountEventSubscriptionCancellation
153 | ) async throws -> CodexAccountEvent? {
154 | try await withTaskCancellationHandler {
155 | let result = await withCheckedContinuation { continuation in
156 | let registration = state.withLock { state -> (
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
157 | Result<CodexAccountEvent?, CodexAppServerError>?,
158 | [CheckedContinuation<Void, Never>]
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:192:54: error: 'withLock' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
188 | }
189 |
190 | func waitUntilNextSuspendsForTesting() async {
| `- note: add '@available' attribute to enclosing instance method
191 | await withCheckedContinuation { continuation in
192 | let isAlreadySuspendedOrFinished = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
193 | if state.waiter != nil {
194 | return true
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:209:32: error: 'withLock' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
206 | }
207 |
208 | func finish(throwing error: CodexAppServerError?) {
| `- note: add '@available' attribute to enclosing instance method
209 | let completion = state.withLock { state -> (
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
210 | CheckedContinuation<Result<CodexAccountEvent?, CodexAppServerError>, Never>?,
211 | [CheckedContinuation<Void, Never>]
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:272:34: error: 'withLock' is only available in visionOS 2.0 or newer
255 | }
256 |
257 | private final class AccountEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
258 | private struct State {
259 | var isCancelled = false
:
269 | }
270 |
271 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
272 | let shouldRemove = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
273 | guard state.isCancelled == false else {
274 | return false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:298:15: error: 'withLock' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
295 | private let state = Mutex(State())
296 |
297 | var isFinished: Bool {
| `- note: add '@available' attribute to enclosing property
298 | state.withLock { $0.terminalError != nil }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
299 | }
300 |
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile AccountEventHub.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerClient.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile AppServerClient.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerConnection.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile AppServerConnection.swift
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:302:15: error: 'withLock' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
299 | }
300 |
301 | var count: Int {
| `- note: add '@available' attribute to enclosing property
302 | state.withLock { $0.channels.count }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
303 | }
304 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:309:35: error: 'withLock' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
303 | }
304 |
305 | func makeEvents() -> CodexAccountEvents {
| `- note: add '@available' attribute to enclosing instance method
306 | let id = UUID()
307 | let channel = AccountEventSubscriberChannel()
308 | let cancellation = AccountEventSubscriptionCancellation(id: id, registry: self)
309 | let terminalError = state.withLock { state -> CodexAppServerError? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
310 | guard let terminalError = state.terminalError else {
311 | state.channels[id] = channel
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:323:30: error: 'withLock' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
320 | }
321 |
322 | func yield(_ event: CodexAccountEvent) {
| `- note: add '@available' attribute to enclosing instance method
323 | let channels = state.withLock { Array($0.channels.values) }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
324 | for channel in channels {
325 | channel.yield(event)
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:330:29: error: 'withLock' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
327 | }
328 |
329 | func remove(_ id: UUID) {
| `- note: add '@available' attribute to enclosing instance method
330 | let channel = state.withLock { $0.channels.removeValue(forKey: id) }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
331 | channel?.finish(throwing: nil)
332 | }
SwiftCompile normal arm64 Compiling\ CodexAppServer.swift,\ CodexAppServerNotificationRouter.swift,\ CodexAppServerRequest.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerNotificationRouter.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerRequest.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift:73:72: error: 'homeDirectoryForCurrentUser' is unavailable in visionOS
71 | public static func defaultCodexHomeURL(
72 | environment: [String: String] = ProcessInfo.processInfo.environment,
73 | homeDirectoryForCurrentUser: URL = FileManager.default.homeDirectoryForCurrentUser,
| `- error: 'homeDirectoryForCurrentUser' is unavailable in visionOS
74 | applicationSupportDirectory: URL? = FileManager.default.urls(
75 | for: .applicationSupportDirectory,
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:1004:35: note: 'homeDirectoryForCurrentUser' has been explicitly marked unavailable here
1002 |
1003 | /// The home directory for the current user.
1004 | @property (readonly, copy) NSURL *homeDirectoryForCurrentUser API_AVAILABLE(macosx(10.12)) API_UNAVAILABLE(ios, watchos, tvos);
| `- note: 'homeDirectoryForCurrentUser' has been explicitly marked unavailable here
1005 | /// The temporary directory for the current user.
1006 | @property (readonly, copy) NSURL *temporaryDirectory API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift:1075:46: error: 'Mutex' is only available in visionOS 2.0 or newer
7 | /// JSON-RPC handshake, and routes server notifications to thread, turn, and
8 | /// login domain objects.
9 | public actor CodexAppServer {
| `- note: add '@available' attribute to enclosing actor
10 | /// Options for creating a Codex app-server container.
11 | public struct Configuration: Sendable {
:
1070 | /// - Parameter apiKey: A nonempty API key without leading or trailing whitespace.
1071 | /// - Throws: An input, transport, JSON-RPC, or app-server authentication error.
1072 | public func login(apiKey: String) async throws {
| `- note: add '@available' attribute to enclosing instance method
1073 | try Self.validate(apiKey: apiKey)
1074 |
1075 | let acceptedWriteHasUnknownOutcome = Mutex(false)
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
1076 | let response: AppServerAPI.Account.Login.Response
1077 | do {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift:1075:46: error: 'init(_:)' is only available in visionOS 2.0 or newer
7 | /// JSON-RPC handshake, and routes server notifications to thread, turn, and
8 | /// login domain objects.
9 | public actor CodexAppServer {
| `- note: add '@available' attribute to enclosing actor
10 | /// Options for creating a Codex app-server container.
11 | public struct Configuration: Sendable {
:
1070 | /// - Parameter apiKey: A nonempty API key without leading or trailing whitespace.
1071 | /// - Throws: An input, transport, JSON-RPC, or app-server authentication error.
1072 | public func login(apiKey: String) async throws {
| `- note: add '@available' attribute to enclosing instance method
1073 | try Self.validate(apiKey: apiKey)
1074 |
1075 | let acceptedWriteHasUnknownOutcome = Mutex(false)
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
1076 | let response: AppServerAPI.Account.Login.Response
1077 | do {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift:1081:52: error: 'withLock' is only available in visionOS 2.0 or newer
7 | /// JSON-RPC handshake, and routes server notifications to thread, turn, and
8 | /// login domain objects.
9 | public actor CodexAppServer {
| `- note: add '@available' attribute to enclosing actor
10 | /// Options for creating a Codex app-server container.
11 | public struct Configuration: Sendable {
:
1070 | /// - Parameter apiKey: A nonempty API key without leading or trailing whitespace.
1071 | /// - Throws: An input, transport, JSON-RPC, or app-server authentication error.
1072 | public func login(apiKey: String) async throws {
| `- note: add '@available' attribute to enclosing instance method
1073 | try Self.validate(apiKey: apiKey)
1074 |
:
1079 | AppServerAPI.Account.Login.Start.Request(params: .apiKey(apiKey)),
1080 | onWriteAccepted: {
1081 | acceptedWriteHasUnknownOutcome.withLock { $0 = true }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
1082 | },
1083 | retriesOverloadResponses: false,
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift:1087:50: error: 'withLock' is only available in visionOS 2.0 or newer
7 | /// JSON-RPC handshake, and routes server notifications to thread, turn, and
8 | /// login domain objects.
9 | public actor CodexAppServer {
| `- note: add '@available' attribute to enclosing actor
10 | /// Options for creating a Codex app-server container.
11 | public struct Configuration: Sendable {
:
1070 | /// - Parameter apiKey: A nonempty API key without leading or trailing whitespace.
1071 | /// - Throws: An input, transport, JSON-RPC, or app-server authentication error.
1072 | public func login(apiKey: String) async throws {
| `- note: add '@available' attribute to enclosing instance method
1073 | try Self.validate(apiKey: apiKey)
1074 |
:
1085 | )
1086 | } catch is CancellationError {
1087 | guard acceptedWriteHasUnknownOutcome.withLock({ $0 }) else {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
1088 | throw CancellationError()
1089 | }
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexAppServer.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerNotificationRouter.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexAppServerNotificationRouter.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerRequest.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexAppServerRequest.swift
SwiftEmitModule normal arm64 Emitting\ module\ for\ CodexAppServerKit (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:295:25: error: 'Mutex' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
293 | }
294 |
295 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
296 |
297 | var isFinished: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:295:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
287 | }
288 |
289 | private final class AccountEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
290 | private struct State {
291 | var channels: [UUID: AccountEventSubscriberChannel] = [:]
:
293 | }
294 |
295 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
296 |
297 | var isFinished: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:122:25: error: 'Mutex' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
120 | }
121 |
122 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
123 |
124 | func yield(_ event: CodexAccountEvent) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:122:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
98 | }
99 |
100 | private final class AccountEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
101 | private enum Terminal {
102 | case open
:
120 | }
121 |
122 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
123 |
124 | func yield(_ event: CodexAccountEvent) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:262:25: error: 'Mutex' is only available in visionOS 2.0 or newer
255 | }
256 |
257 | private final class AccountEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
258 | private struct State {
259 | var isCancelled = false
260 | }
261 |
262 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
263 | private let id: UUID
264 | private let registry: AccountEventSubscriptionRegistry
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift:262:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
255 | }
256 |
257 | private final class AccountEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
258 | private struct State {
259 | var isCancelled = false
260 | }
261 |
262 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
263 | private let id: UUID
264 | private let registry: AccountEventSubscriptionRegistry
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:573:25: error: 'Mutex' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
571 | }
572 |
573 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
574 |
575 | func next() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:573:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
571 | }
572 |
573 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
574 |
575 | func next() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:646:25: error: 'Mutex' is only available in visionOS 2.0 or newer
637 | }
638 |
639 | private final class AppServerReadEventWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
640 | private enum State {
641 | case pending(CheckedContinuation<AppServerReadEvent, Never>?)
:
644 |
645 | let id = UUID()
646 | private let state = Mutex<State>(.pending(nil))
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
647 |
648 | func wait() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:646:36: error: 'init(_:)' is only available in visionOS 2.0 or newer
637 | }
638 |
639 | private final class AppServerReadEventWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
640 | private enum State {
641 | case pending(CheckedContinuation<AppServerReadEvent, Never>?)
:
644 |
645 | let id = UUID()
646 | private let state = Mutex<State>(.pending(nil))
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
647 |
648 | func wait() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:864:25: error: 'Mutex' is only available in visionOS 2.0 or newer
856 | }
857 |
858 | private final class AppServerCancellationCompletion: Sendable {
| `- note: add '@available' attribute to enclosing class
859 | private enum State {
860 | case pending([CheckedContinuation<Void, Never>])
:
862 | }
863 |
864 | private let state = Mutex<State>(.pending([]))
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
865 |
866 | func wait() async {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:864:36: error: 'init(_:)' is only available in visionOS 2.0 or newer
856 | }
857 |
858 | private final class AppServerCancellationCompletion: Sendable {
| `- note: add '@available' attribute to enclosing class
859 | private enum State {
860 | case pending([CheckedContinuation<Void, Never>])
:
862 | }
863 |
864 | private let state = Mutex<State>(.pending([]))
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
865 |
866 | func wait() async {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:695:24: error: 'Mutex' is only available in visionOS 2.0 or newer
686 | }
687 |
688 | private final class AppServerPipeReadEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
689 | private struct State {
690 | var source: DispatchSourceRead?
:
693 | private let signal = AppServerOneBitReadSignal()
694 | private let cancellationCompletion = AppServerCancellationCompletion()
695 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
696 |
697 | init(
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:761:25: error: 'Mutex' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
759 | }
760 |
761 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
762 |
763 | func beginChunk(byteCount: Int) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:761:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
759 | }
760 |
761 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
762 |
763 | func beginChunk(byteCount: Int) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:814:24: error: 'Mutex' is only available in visionOS 2.0 or newer
805 | }
806 |
807 | private final class AppServerProcessExitEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
808 | private struct State {
809 | var source: DispatchSourceProcess?
:
812 | private let signal = AppServerOneBitReadSignal()
813 | private let cancellationCompletion = AppServerCancellationCompletion()
814 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
815 |
816 | init(processIdentifier: pid_t) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:906:24: error: 'Mutex' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
904 | }
905 |
906 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
907 |
908 | package init(fileHandle: FileHandle) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1121:29: error: 'Mutex' is only available in visionOS 2.0 or newer
1110 | }
1111 |
1112 | private final class AppServerSpawnedProcess: @unchecked Sendable {
| `- note: add '@available' attribute to enclosing class
1113 | let processIdentifier: pid_t
1114 |
:
1119 | var reapSystemCallCount = 0
1120 | }
1121 | private let exitState = Mutex(ExitState())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
1122 |
1123 | private init(processIdentifier: pid_t) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1121:29: error: 'init(_:)' is only available in visionOS 2.0 or newer
1110 | }
1111 |
1112 | private final class AppServerSpawnedProcess: @unchecked Sendable {
| `- note: add '@available' attribute to enclosing class
1113 | let processIdentifier: pid_t
1114 |
:
1119 | var reapSystemCallCount = 0
1120 | }
1121 | private let exitState = Mutex(ExitState())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
1122 |
1123 | private init(processIdentifier: pid_t) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1590:25: error: 'Mutex' is only available in visionOS 2.0 or newer
1581 | }
1582 |
1583 | package final class ProcessTerminationToken: Sendable {
| `- note: add '@available' attribute to enclosing class
1584 | private struct State {
1585 | var didRequestTermination = false
:
1588 |
1589 | private let processGroupID: pid_t?
1590 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
1591 | private let terminationRequestSignal = AppServerOneBitReadSignal()
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1590:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
1581 | }
1582 |
1583 | package final class ProcessTerminationToken: Sendable {
| `- note: add '@available' attribute to enclosing class
1584 | private struct State {
1585 | var didRequestTermination = false
:
1588 |
1589 | private let processGroupID: pid_t?
1590 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
1591 | private let terminationRequestSignal = AppServerOneBitReadSignal()
1592 |
SwiftCompile normal arm64 (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
SwiftCompile normal arm64 Compiling\ CodexThreadOperations.swift,\ CodexTurnSequences.swift,\ CodexTurnSnapshotReducer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexThreadOperations.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexTurnSequences.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexTurnSnapshotReducer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexThreadOperations.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexThreadOperations.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexTurnSequences.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexTurnSequences.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexTurnSnapshotReducer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexTurnSnapshotReducer.swift
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexThreadOperations.swift:537:33: error: 'Mutex' is only available in visionOS 2.0 or newer
534 | }
535 |
536 | package final class CodexResponseCancellationRecorder: Sendable {
| `- note: add '@available' attribute to enclosing class
537 | private let storedOutcome = Mutex<CodexTurnOutcome?>(nil)
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
538 |
539 | package var outcome: CodexTurnOutcome? {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexThreadOperations.swift:537:56: error: 'init(_:)' is only available in visionOS 2.0 or newer
534 | }
535 |
536 | package final class CodexResponseCancellationRecorder: Sendable {
| `- note: add '@available' attribute to enclosing class
537 | private let storedOutcome = Mutex<CodexTurnOutcome?>(nil)
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
538 |
539 | package var outcome: CodexTurnOutcome? {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexThreadOperations.swift:540:23: error: 'withLock' is only available in visionOS 2.0 or newer
534 | }
535 |
536 | package final class CodexResponseCancellationRecorder: Sendable {
| `- note: add '@available' attribute to enclosing class
537 | private let storedOutcome = Mutex<CodexTurnOutcome?>(nil)
538 |
539 | package var outcome: CodexTurnOutcome? {
| `- note: add '@available' attribute to enclosing property
540 | storedOutcome.withLock { $0 }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
541 | }
542 |
SwiftCompile normal arm64 Compiling\ ConnectionEventHub.swift,\ ConnectionSupervisor.swift,\ ConnectionTerminationArbiter.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionTerminationArbiter.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:489:25: error: 'Mutex' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
487 | }
488 |
489 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
490 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
491 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:489:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
487 | }
488 |
489 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
490 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
491 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:492:28: error: 'Mutex' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
490 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
491 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
492 | private let delivery = Mutex(())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
493 |
494 | func makeEvents() -> CodexConnectionEvents {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:492:28: error: 'init(_:)' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
490 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
491 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
492 | private let delivery = Mutex(())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
493 |
494 | func makeEvents() -> CodexConnectionEvents {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:295:25: error: 'Mutex' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
293 |
294 | private static let diagnosticCapacity = 32
295 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
296 |
297 | func yield(_ event: CodexConnectionEvent) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:295:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
293 |
294 | private static let diagnosticCapacity = 32
295 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
296 |
297 | func yield(_ event: CodexConnectionEvent) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:456:25: error: 'Mutex' is only available in visionOS 2.0 or newer
449 | }
450 |
451 | private final class ConnectionEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
452 | private struct State {
453 | var isCancelled = false
454 | }
455 |
456 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
457 | private let id: UUID
458 | private let registry: ConnectionEventSubscriptionRegistry
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:456:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
449 | }
450 |
451 | private final class ConnectionEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
452 | private struct State {
453 | var isCancelled = false
454 | }
455 |
456 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
457 | private let id: UUID
458 | private let registry: ConnectionEventSubscriptionRegistry
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:298:28: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
295 | private let state = Mutex(State())
296 |
297 | func yield(_ event: CodexConnectionEvent) {
| `- note: add '@available' attribute to enclosing instance method
298 | let waiter = state.withLock { state -> CheckedContinuation<
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
299 | CodexConnectionEvent?, Never
300 | >? in
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:318:32: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
315 | }
316 |
317 | func finish(with termination: CodexConnectionTermination) {
| `- note: add '@available' attribute to enclosing instance method
318 | let completion = state.withLock { state -> (
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
319 | CheckedContinuation<CodexConnectionEvent?, Never>?,
320 | [CheckedContinuation<Void, Never>]
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:348:32: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
345 | }
346 |
347 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
348 | let completion = state.withLock { state -> (
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
349 | CheckedContinuation<CodexConnectionEvent?, Never>?,
350 | [CheckedContinuation<Void, Never>]
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:382:42: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
370 | }
371 |
372 | func next(
| `- note: add '@available' attribute to enclosing instance method
373 | cancellation: ConnectionEventSubscriptionCancellation
374 | ) async -> CodexConnectionEvent? {
:
380 | return await withTaskCancellationHandler {
381 | await withCheckedContinuation { continuation in
382 | let registration = state.withLock { state -> (
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
383 | CodexConnectionEvent??,
384 | [CheckedContinuation<Void, Never>]
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:416:15: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
413 | }
414 |
415 | func tryBeginNext() -> Bool {
| `- note: add '@available' attribute to enclosing instance method
416 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
417 | guard state.nextIsActive == false else {
418 | return false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:426:15: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
423 | }
424 |
425 | func endNext() {
| `- note: add '@available' attribute to enclosing instance method
426 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
427 | precondition(state.nextIsActive, "A next() call must own the channel before ending.")
428 | state.nextIsActive = false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:434:54: error: 'withLock' is only available in visionOS 2.0 or newer
276 | }
277 |
278 | private final class ConnectionEventSubscriberChannel: Sendable {
| `- note: add '@available' attribute to enclosing class
279 | private enum Phase {
280 | case open
:
430 | }
431 |
432 | func waitUntilNextSuspendsForTesting() async {
| `- note: add '@available' attribute to enclosing instance method
433 | await withCheckedContinuation { continuation in
434 | let isAlreadySuspendedOrFinished = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
435 | if state.waiter != nil {
436 | return true
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:466:34: error: 'withLock' is only available in visionOS 2.0 or newer
449 | }
450 |
451 | private final class ConnectionEventSubscriptionCancellation: Sendable {
| `- note: add '@available' attribute to enclosing class
452 | private struct State {
453 | var isCancelled = false
:
463 | }
464 |
465 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
466 | let shouldRemove = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
467 | guard state.isCancelled == false else {
468 | return false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:498:18: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
492 | private let delivery = Mutex(())
493 |
494 | func makeEvents() -> CodexConnectionEvents {
| `- note: add '@available' attribute to enclosing instance method
495 | let id = UUID()
496 | let channel = ConnectionEventSubscriberChannel()
497 | let cancellation = ConnectionEventSubscriptionCancellation(id: id, registry: self)
498 | delivery.withLock { _ in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
499 | let terminal = state.withLock { state -> CodexConnectionTermination? in
500 | guard let terminal = state.terminal else {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:499:34: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
492 | private let delivery = Mutex(())
493 |
494 | func makeEvents() -> CodexConnectionEvents {
| `- note: add '@available' attribute to enclosing instance method
495 | let id = UUID()
496 | let channel = ConnectionEventSubscriberChannel()
497 | let cancellation = ConnectionEventSubscriptionCancellation(id: id, registry: self)
498 | delivery.withLock { _ in
499 | let terminal = state.withLock { state -> CodexConnectionTermination? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
500 | guard let terminal = state.terminal else {
501 | state.channels[id] = channel
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:514:18: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
511 | }
512 |
513 | func yield(_ event: CodexConnectionEvent) {
| `- note: add '@available' attribute to enclosing instance method
514 | delivery.withLock { _ in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
515 | let channels = state.withLock { state -> [ConnectionEventSubscriberChannel] in
516 | guard state.terminal == nil else {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:515:34: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
511 | }
512 |
513 | func yield(_ event: CodexConnectionEvent) {
| `- note: add '@available' attribute to enclosing instance method
514 | delivery.withLock { _ in
515 | let channels = state.withLock { state -> [ConnectionEventSubscriberChannel] in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
516 | guard state.terminal == nil else {
517 | return []
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:528:29: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
525 | }
526 |
527 | func remove(_ id: UUID) {
| `- note: add '@available' attribute to enclosing instance method
528 | let channel = state.withLock { $0.channels.removeValue(forKey: id) }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
529 | channel?.cancel()
530 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:533:18: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
530 | }
531 |
532 | func finish(with termination: CodexConnectionTermination) {
| `- note: add '@available' attribute to enclosing instance method
533 | delivery.withLock { _ in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
534 | let channels = state.withLock { state -> [ConnectionEventSubscriberChannel] in
535 | if let existing = state.terminal {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:534:34: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
530 | }
531 |
532 | func finish(with termination: CodexConnectionTermination) {
| `- note: add '@available' attribute to enclosing instance method
533 | delivery.withLock { _ in
534 | let channels = state.withLock { state -> [ConnectionEventSubscriberChannel] in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
535 | if let existing = state.terminal {
536 | precondition(
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:554:30: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
551 | }
552 |
553 | func cancelAll() {
| `- note: add '@available' attribute to enclosing instance method
554 | let channels = state.withLock { state -> [ConnectionEventSubscriberChannel] in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
555 | let channels = Array(state.channels.values)
556 | state.channels.removeAll(keepingCapacity: false)
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift:565:15: error: 'withLock' is only available in visionOS 2.0 or newer
481 | }
482 |
483 | private final class ConnectionEventSubscriptionRegistry: Sendable {
| `- note: add '@available' attribute to enclosing class
484 | private struct State {
485 | var channels: [UUID: ConnectionEventSubscriberChannel] = [:]
:
562 | }
563 |
564 | func snapshot() -> ConnectionEventHub.Snapshot {
| `- note: add '@available' attribute to enclosing instance method
565 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
566 | .init(subscriberCount: state.channels.count, terminal: state.terminal)
567 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:16:25: error: 'Mutex' is only available in visionOS 2.0 or newer
8 | )
9 |
10 | package final class ConnectionCloseAction: Sendable {
| `- note: add '@available' attribute to enclosing class
11 | private enum Request: Sendable {
12 | case close
:
14 | }
15 |
16 | private let action: Mutex<(@Sendable (Request) async -> Void)?>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
17 |
18 | package init(action: (@Sendable () async -> Void)? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:300:24: error: 'Mutex' is only available in visionOS 2.0 or newer
292 | }
293 |
294 | package final class AppServerConnectionLease: Sendable {
| `- note: add '@available' attribute to enclosing class
295 | private struct State {
296 | var supervisor: ConnectionSupervisor
:
298 | }
299 |
300 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
301 |
302 | package init(
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:25:23: error: 'Mutex' is only available in visionOS 2.0 or newer
8 | )
9 |
10 | package final class ConnectionCloseAction: Sendable {
| `- note: add '@available' attribute to enclosing class
11 | private enum Request: Sendable {
12 | case close
:
16 | private let action: Mutex<(@Sendable (Request) async -> Void)?>
17 |
18 | package init(action: (@Sendable () async -> Void)? = nil) {
| `- note: add '@available' attribute to enclosing initializer
19 | let wrappedAction: (@Sendable (Request) async -> Void)?
20 | if let action {
:
23 | wrappedAction = nil
24 | }
25 | self.action = Mutex(wrappedAction)
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
26 | }
27 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:25:23: error: 'init(_:)' is only available in visionOS 2.0 or newer
8 | )
9 |
10 | package final class ConnectionCloseAction: Sendable {
| `- note: add '@available' attribute to enclosing class
11 | private enum Request: Sendable {
12 | case close
:
16 | private let action: Mutex<(@Sendable (Request) async -> Void)?>
17 |
18 | package init(action: (@Sendable () async -> Void)? = nil) {
| `- note: add '@available' attribute to enclosing initializer
19 | let wrappedAction: (@Sendable (Request) async -> Void)?
20 | if let action {
:
23 | wrappedAction = nil
24 | }
25 | self.action = Mutex(wrappedAction)
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
26 | }
27 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:29:16: error: 'withLock' is only available in visionOS 2.0 or newer
8 | )
9 |
10 | package final class ConnectionCloseAction: Sendable {
| `- note: add '@available' attribute to enclosing class
11 | private enum Request: Sendable {
12 | case close
:
26 | }
27 |
28 | package func bind(to supervisor: ConnectionSupervisor) {
| `- note: add '@available' attribute to enclosing instance method
29 | action.withLock { action in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
30 | precondition(action == nil, "Connection close action may be bound exactly once.")
31 | action = { [weak supervisor] request in
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:48:35: error: 'withLock' is only available in visionOS 2.0 or newer
8 | )
9 |
10 | package final class ConnectionCloseAction: Sendable {
| `- note: add '@available' attribute to enclosing class
11 | private enum Request: Sendable {
12 | case close
:
45 | }
46 |
47 | package func closeConnection() async {
| `- note: add '@available' attribute to enclosing instance method
48 | guard let action = action.withLock({ $0 }) else {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
49 | preconditionFailure("Connection close action is not bound.")
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:55:35: error: 'withLock' is only available in visionOS 2.0 or newer
8 | )
9 |
10 | package final class ConnectionCloseAction: Sendable {
| `- note: add '@available' attribute to enclosing class
11 | private enum Request: Sendable {
12 | case close
:
52 | }
53 |
54 | package func failConnection(with failure: CodexTransportFailure) async {
| `- note: add '@available' attribute to enclosing instance method
55 | guard let action = action.withLock({ $0 }) else {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
56 | preconditionFailure("Connection close action is not bound.")
57 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:306:22: error: 'Mutex' is only available in visionOS 2.0 or newer
292 | }
293 |
294 | package final class AppServerConnectionLease: Sendable {
| `- note: add '@available' attribute to enclosing class
295 | private struct State {
296 | var supervisor: ConnectionSupervisor
:
300 | private let state: Mutex<State>
301 |
302 | package init(
| `- note: add '@available' attribute to enclosing initializer
303 | supervisor: ConnectionSupervisor,
304 | processTerminationToken: ProcessTerminationToken
305 | ) {
306 | self.state = Mutex(.init(
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
307 | supervisor: supervisor,
308 | processTerminationToken: processTerminationToken
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:306:22: error: 'init(_:)' is only available in visionOS 2.0 or newer
292 | }
293 |
294 | package final class AppServerConnectionLease: Sendable {
| `- note: add '@available' attribute to enclosing class
295 | private struct State {
296 | var supervisor: ConnectionSupervisor
:
300 | private let state: Mutex<State>
301 |
302 | package init(
| `- note: add '@available' attribute to enclosing initializer
303 | supervisor: ConnectionSupervisor,
304 | processTerminationToken: ProcessTerminationToken
305 | ) {
306 | self.state = Mutex(.init(
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
307 | supervisor: supervisor,
308 | processTerminationToken: processTerminationToken
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:313:15: error: 'withLock' is only available in visionOS 2.0 or newer
292 | }
293 |
294 | package final class AppServerConnectionLease: Sendable {
| `- note: add '@available' attribute to enclosing class
295 | private struct State {
296 | var supervisor: ConnectionSupervisor
:
311 |
312 | deinit {
313 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
314 | state.processTerminationToken.terminateOnce()
315 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift:319:32: error: 'withLock' is only available in visionOS 2.0 or newer
292 | }
293 |
294 | package final class AppServerConnectionLease: Sendable {
| `- note: add '@available' attribute to enclosing class
295 | private struct State {
296 | var supervisor: ConnectionSupervisor
:
316 | }
317 |
318 | package func closeConnection() async {
| `- note: add '@available' attribute to enclosing instance method
319 | let supervisor = state.withLock { $0.supervisor }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
320 | await supervisor.closeConnection()
321 | }
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile ConnectionEventHub.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile ConnectionSupervisor.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionTerminationArbiter.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile ConnectionTerminationArbiter.swift
SwiftCompile normal arm64 Compiling\ InterruptRaceResolver.swift,\ JSONRPC.swift,\ JSONRPCEnvelopeCodec.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/InterruptRaceResolver.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPC.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift:180:25: error: 'Mutex' is only available in visionOS 2.0 or newer
172 | }
173 |
174 | package final class JSONRPCResponseWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
175 | private enum State {
176 | case pending(CheckedContinuation<Result<Data, JSONRPC.Error>, Never>?)
:
178 | }
179 |
180 | private let state = Mutex<State>(.pending(nil))
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
181 |
182 | package init() {}
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift:180:36: error: 'init(_:)' is only available in visionOS 2.0 or newer
172 | }
173 |
174 | package final class JSONRPCResponseWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
175 | private enum State {
176 | case pending(CheckedContinuation<Result<Data, JSONRPC.Error>, Never>?)
:
178 | }
179 |
180 | private let state = Mutex<State>(.pending(nil))
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
181 |
182 | package init() {}
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift:186:34: error: 'withLock' is only available in visionOS 2.0 or newer
172 | }
173 |
174 | package final class JSONRPCResponseWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
175 | private enum State {
176 | case pending(CheckedContinuation<Result<Data, JSONRPC.Error>, Never>?)
:
182 | package init() {}
183 |
184 | package func wait() async throws -> Data {
| `- note: add '@available' attribute to enclosing instance method
185 | let result = await withCheckedContinuation { continuation in
186 | let resolved = state.withLock {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
187 | state -> Result<Data, JSONRPC.Error>? in
188 | switch state {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift:207:32: error: 'withLock' is only available in visionOS 2.0 or newer
172 | }
173 |
174 | package final class JSONRPCResponseWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
175 | private enum State {
176 | case pending(CheckedContinuation<Result<Data, JSONRPC.Error>, Never>?)
:
204 |
205 | @discardableResult
206 | package func resolve(_ result: Result<Data, JSONRPC.Error>) -> Bool {
| `- note: add '@available' attribute to enclosing instance method
207 | let resolution = state.withLock {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
208 | state -> (Bool, CheckedContinuation<Result<Data, JSONRPC.Error>, Never>?) in
209 | switch state {
Failed frontend command:
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AccountEventHub.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerClient.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerConnection.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerNotificationDecoder.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerRequests.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerNotificationRouter.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerRequest.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerRequestCodec.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexDomainTypes.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexItemReducer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexThreadOperations.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexTurnSequences.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexTurnSnapshotReducer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionEventHub.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionSupervisor.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ConnectionTerminationArbiter.swift -primary-file /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/InterruptRaceResolver.swift -primary-file /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPC.swift -primary-file /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/LoginRegistry.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ReviewRestartCoordinator.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ServerRequestRegistry.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/ThreadEventHub.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayStore.swift -supplementary-output-file-map /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/supplementaryOutputs-7 -target arm64-apple-xros1.0 -disable-cross-import-overlay-search -swift-module-cross-import Darwin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS.sdk/usr/include/Darwin.swiftcrossimport/xlocale.swiftoverlay -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/lib/swift/host/plugins/libFoundationMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/bin/swift-plugin-server\#FoundationMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/lib/swift/host/plugins/libObservationMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/bin/swift-plugin-server\#ObservationMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/lib/swift/host/plugins/libSwiftMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/bin/swift-plugin-server\#SwiftMacros -disable-implicit-swift-modules -Xcc -fno-implicit-modules -Xcc -fno-implicit-module-maps -explicit-swift-module-map-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/CodexAppServerKit-dependencies-1.json -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk -I /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros -Isystem /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/usr/lib -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/Library/Frameworks -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS27.0.sdk/Developer/Library/Frameworks -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -no-color-diagnostics -Xcc -fno-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -profile-generate -profile-coverage-mapping -swift-version 6 -Onone -D SWIFT_PACKAGE -D DEBUG -D SWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -D Xcode -serialize-debugging-options -enable-experimental-feature DebugDescriptionMacro -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -enable-anonymous-context-mangled-names -file-compilation-dir /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -ivfsstatcache -Xcc /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/xros27.0-24M361-e829b21a6f8c9b70876ba0858053c044735bd543db762f57723cac368afd1ce4.sdkstatcache -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-xros/include -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/DerivedSources-normal/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/DerivedSources/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -no-auto-bridging-header-chaining -module-name CodexAppServerKit -package-name spi_builder_workspace -const-gather-protocols-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/CodexAppServerKit_const_extract_protocols.json -disable-clang-spi -clang-target arm64-apple-xros27.0 -target-sdk-version 27.0 -target-sdk-name xros27.0 -in-process-plugin-server-path /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -parse-as-library -o /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/InterruptRaceResolver.o -o /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/JSONRPC.o -o /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/JSONRPCEnvelopeCodec.o -debug-module-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/CodexAppServerKit.swiftmodule -index-unit-output-path /CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/InterruptRaceResolver.o -index-unit-output-path /CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/JSONRPC.o -index-unit-output-path /CodexKit.build/Debug-xros/CodexAppServerKit-t.build/Objects-normal/arm64/JSONRPCEnvelopeCodec.o -index-store-path /Users/admin/builder/spi-builder-workspace/.derivedData/Index.noindex/DataStore -index-system-modules
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/InterruptRaceResolver.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile InterruptRaceResolver.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPC.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile JSONRPC.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile JSONRPCEnvelopeCodec.swift
SwiftCompile normal arm64 Compiling\ JSONRPCInboundFrameMailbox.swift,\ LoginRegistry.swift,\ RequestSerializer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/LoginRegistry.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift:293:25: error: 'Mutex' is only available in visionOS 2.0 or newer
283 | }
284 |
285 | private final class MailboxWaiter<Value: Sendable>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
286 | private enum State {
287 | case pending(CheckedContinuation<Value, Never>?)
:
291 | let id = UUID()
292 | private let cancellationValue: Value
293 | private let state = Mutex<State>(.pending(nil))
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
294 |
295 | init(cancellationValue: Value) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift:293:36: error: 'init(_:)' is only available in visionOS 2.0 or newer
283 | }
284 |
285 | private final class MailboxWaiter<Value: Sendable>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
286 | private enum State {
287 | case pending(CheckedContinuation<Value, Never>?)
:
291 | let id = UUID()
292 | private let cancellationValue: Value
293 | private let state = Mutex<State>(.pending(nil))
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
294 |
295 | init(cancellationValue: Value) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift:302:38: error: 'withLock' is only available in visionOS 2.0 or newer
283 | }
284 |
285 | private final class MailboxWaiter<Value: Sendable>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
286 | private enum State {
287 | case pending(CheckedContinuation<Value, Never>?)
:
297 | }
298 |
299 | func wait() async -> Value {
| `- note: add '@available' attribute to enclosing instance method
300 | await withTaskCancellationHandler {
301 | await withCheckedContinuation { continuation in
302 | let resolved = state.withLock { state -> Value? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
303 | switch state {
304 | case .pending(nil):
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift:324:32: error: 'withLock' is only available in visionOS 2.0 or newer
283 | }
284 |
285 | private final class MailboxWaiter<Value: Sendable>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
286 | private enum State {
287 | case pending(CheckedContinuation<Value, Never>?)
:
321 |
322 | @discardableResult
323 | func resolve(_ value: Value) -> Bool {
| `- note: add '@available' attribute to enclosing instance method
324 | let resolution = state.withLock {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
325 | state -> (Bool, CheckedContinuation<Value, Never>?) in
326 | switch state {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:39:25: error: 'Mutex' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
37 | }
38 |
39 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
40 |
41 | package init() {}
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:39:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
37 | }
38 |
39 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
40 |
41 | package init() {}
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:397:25: error: 'Mutex' is only available in visionOS 2.0 or newer
385 | }
386 |
387 | private final class RequestQueueCountWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
388 | private enum State: Sendable {
389 | case idle
:
395 | let id = UUID()
396 | let minimumCount: Int
397 | private let state = Mutex(State.idle)
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
398 |
399 | init(minimumCount: Int) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:397:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
385 | }
386 |
387 | private final class RequestQueueCountWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
388 | private enum State: Sendable {
389 | case idle
:
395 | let id = UUID()
396 | let minimumCount: Int
397 | private let state = Mutex(State.idle)
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
398 |
399 | init(minimumCount: Int) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:485:25: error: 'Mutex' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
483 |
484 | let id = UUID()
485 | private let state = Mutex(State.idle)
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
486 |
487 | var isPending: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:485:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
483 |
484 | let id = UUID()
485 | private let state = Mutex(State.idle)
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
486 |
487 | var isPending: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:44:29: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
41 | package init() {}
42 |
43 | package func requestCancellation() {
| `- note: add '@available' attribute to enclosing instance method
44 | let waiters = state.withLock { state -> [
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
45 | CheckedContinuation<RequestOperationAbandonment?, Never>
46 | ] in
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:61:28: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
58 | }
59 |
60 | package func requestDeadline() -> DeadlineDisposition {
| `- note: add '@available' attribute to enclosing instance method
61 | let result = state.withLock { state -> (
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
62 | DeadlineDisposition,
63 | [CheckedContinuation<RequestOperationAbandonment?, Never>]
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:92:33: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
89 | }
90 |
91 | package func acceptWrite() throws {
| `- note: add '@available' attribute to enclosing instance method
92 | let abandonment = state.withLock { state -> RequestOperationAbandonment? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
93 | switch state.phase {
94 | case .preWrite, .retryReady:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:110:33: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
107 | }
108 |
109 | package func beginRetryWait() throws {
| `- note: add '@available' attribute to enclosing instance method
110 | let abandonment = state.withLock { state -> RequestOperationAbandonment? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
111 | precondition(state.phase == .written, "A retry wait requires a correlated response.")
112 | state.phase = .retryWaiting
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:121:33: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
118 | }
119 |
120 | package func finishRetryWait() throws {
| `- note: add '@available' attribute to enclosing instance method
121 | let abandonment = state.withLock { state -> RequestOperationAbandonment? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
122 | precondition(state.phase == .retryWaiting, "Only a waiting retry can become ready.")
123 | if let abandonment = state.abandonment {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:138:41: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
132 | }
133 |
134 | package func waitForAbandonment() async -> RequestOperationAbandonment? {
| `- note: add '@available' attribute to enclosing instance method
135 | let waiterID = UUID()
136 | return await withTaskCancellationHandler {
137 | await withCheckedContinuation { continuation in
138 | let abandonment = state.withLock { state -> RequestOperationAbandonment? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
139 | if let abandonment = state.abandonment {
140 | return abandonment
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:155:28: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
152 | }
153 |
154 | private func cancelAbandonmentWaiter(_ waiterID: UUID) {
| `- note: add '@available' attribute to enclosing instance method
155 | let waiter = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
156 | state.abandonmentWaiters.removeValue(forKey: waiterID)
157 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:162:15: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
159 | }
160 |
161 | package func markResponseBound() {
| `- note: add '@available' attribute to enclosing instance method
162 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
163 | precondition(state.phase == .written, "A response can only bind after write acceptance.")
164 | state.phase = .responseBound
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:171:15: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
166 | }
167 |
168 | package func resolveResponse(
| `- note: add '@available' attribute to enclosing instance method
169 | postWriteCallerCancellationPolicy: PostWriteCallerCancellationPolicy
170 | ) -> ResponseDisposition {
171 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
172 | precondition(state.phase == .responseBound, "A request response must be bound before resolution.")
173 | if let abandonment = state.abandonment {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:187:15: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
184 | }
185 |
186 | package func markCleanupComplete() {
| `- note: add '@available' attribute to enclosing instance method
187 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
188 | precondition(state.phase == .responseBound, "Cancellation cleanup requires a bound response.")
189 | precondition(state.abandonment != nil, "Request cleanup requires operation abandonment.")
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:195:15: error: 'withLock' is only available in visionOS 2.0 or newer
2 | import Synchronization
3 |
4 | package final class RequestOperationState: Sendable {
| `- note: add '@available' attribute to enclosing class
5 | package enum PostWriteCallerCancellationPolicy: Equatable, Sendable {
6 | case performCleanup
:
192 | }
193 |
194 | package func preWriteCancellationShouldWin() -> Bool {
| `- note: add '@available' attribute to enclosing instance method
195 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
196 | (state.phase == .preWrite || state.phase == .retryReady)
197 | && state.abandonment == .callerCancellation
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:404:15: error: 'withLock' is only available in visionOS 2.0 or newer
385 | }
386 |
387 | private final class RequestQueueCountWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
388 | private enum State: Sendable {
389 | case idle
:
401 | }
402 |
403 | var isPending: Bool {
| `- note: add '@available' attribute to enclosing property
404 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
405 | switch state {
406 | case .idle, .waiting:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:417:39: error: 'withLock' is only available in visionOS 2.0 or newer
385 | }
386 |
387 | private final class RequestQueueCountWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
388 | private enum State: Sendable {
389 | case idle
:
412 | }
413 |
414 | func wait() async -> Bool {
| `- note: add '@available' attribute to enclosing instance method
415 | await withTaskCancellationHandler {
416 | await withCheckedContinuation { continuation in
417 | let immediate = state.withLock { state -> Bool? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
418 | switch state {
419 | case .idle:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:444:34: error: 'withLock' is only available in visionOS 2.0 or newer
385 | }
386 |
387 | private final class RequestQueueCountWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
388 | private enum State: Sendable {
389 | case idle
:
441 | }
442 |
443 | func satisfy() {
| `- note: add '@available' attribute to enclosing instance method
444 | let continuation = state.withLock { state -> CheckedContinuation<Bool, Never>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
445 | switch state {
446 | case .idle:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:460:34: error: 'withLock' is only available in visionOS 2.0 or newer
385 | }
386 |
387 | private final class RequestQueueCountWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
388 | private enum State: Sendable {
389 | case idle
:
457 | }
458 |
459 | private func cancel() {
| `- note: add '@available' attribute to enclosing instance method
460 | let continuation = state.withLock { state -> CheckedContinuation<Bool, Never>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
461 | switch state {
462 | case .idle:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:488:15: error: 'withLock' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
485 | private let state = Mutex(State.idle)
486 |
487 | var isPending: Bool {
| `- note: add '@available' attribute to enclosing property
488 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
489 | switch state {
490 | case .idle, .waiting:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:501:39: error: 'withLock' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
496 | }
497 |
498 | func wait() async -> Bool {
| `- note: add '@available' attribute to enclosing instance method
499 | await withTaskCancellationHandler {
500 | await withCheckedContinuation { continuation in
501 | let immediate = state.withLock { state -> Bool? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
502 | switch state {
503 | case .idle:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:528:34: error: 'withLock' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
525 | }
526 |
527 | func acquire() -> Bool {
| `- note: add '@available' attribute to enclosing instance method
528 | let continuation = state.withLock { state -> CheckedContinuation<Bool, Never>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
529 | switch state {
530 | case .idle:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:543:22: error: 'withLock' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
525 | }
526 |
527 | func acquire() -> Bool {
| `- note: add '@available' attribute to enclosing instance method
528 | let continuation = state.withLock { state -> CheckedContinuation<Bool, Never>? in
529 | switch state {
:
541 | }
542 | continuation?.resume(returning: true)
543 | return state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
544 | if case .acquired = state {
545 | true
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift:553:34: error: 'withLock' is only available in visionOS 2.0 or newer
474 | }
475 |
476 | private final class RequestLaneWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
477 | private enum State: Sendable {
478 | case idle
:
550 | }
551 |
552 | private func cancel() {
| `- note: add '@available' attribute to enclosing instance method
553 | let continuation = state.withLock { state -> CheckedContinuation<Bool, Never>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
554 | switch state {
555 | case .idle:
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCInboundFrameMailbox.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile JSONRPCInboundFrameMailbox.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/LoginRegistry.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile LoginRegistry.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/RequestSerializer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile RequestSerializer.swift
SwiftCompile normal arm64 Compiling\ CodexAppServerRequestCodec.swift,\ CodexDomainTypes.swift,\ CodexItemReducer.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerRequestCodec.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexDomainTypes.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexItemReducer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexAppServerRequestCodec.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexAppServerRequestCodec.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexDomainTypes.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexDomainTypes.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/CodexItemReducer.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile CodexItemReducer.swift
SwiftCompile normal arm64 Compiling\ TurnReplayCore.swift,\ TurnReplayStore.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayStore.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:40:28: error: 'Mutex' is only available in visionOS 2.0 or newer
37 | }
38 |
39 | private final class TurnReplayPendingWritePhase: Sendable {
| `- note: add '@available' attribute to enclosing class
40 | private let accepted = Mutex(false)
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
41 |
42 | var isWriteAccepted: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:40:28: error: 'init(_:)' is only available in visionOS 2.0 or newer
37 | }
38 |
39 | private final class TurnReplayPendingWritePhase: Sendable {
| `- note: add '@available' attribute to enclosing class
40 | private let accepted = Mutex(false)
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
41 |
42 | var isWriteAccepted: Bool {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:751:25: error: 'Mutex' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
749 | }
750 |
751 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
752 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
753 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:751:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
749 | }
750 |
751 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
752 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
753 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:754:28: error: 'Mutex' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
752 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
753 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
754 | private let delivery = Mutex(())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
755 |
756 | func makeSubscription(
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:754:28: error: 'init(_:)' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
752 | // `remove` and `cancelAll` must never acquire `delivery`: channel completion can wait on a
753 | // subscriber task-status lock while that lock runs its cancellation handler back into remove.
754 | private let delivery = Mutex(())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
755 |
756 | func makeSubscription(
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:390:25: error: 'Mutex' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
388 |
389 | private static let incrementalCapacity = 256
390 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
391 |
392 | func yield(_ event: CodexTurnEvent, accumulatedSnapshot: CodexTurnSnapshot) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:390:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
388 |
389 | private static let incrementalCapacity = 256
390 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
391 |
392 | func yield(_ event: CodexTurnEvent, accumulatedSnapshot: CodexTurnSnapshot) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:560:25: error: 'Mutex' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
558 | }
559 |
560 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
561 |
562 | func yield(_ progress: CodexReviewProgress) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:560:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
558 | }
559 |
560 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
561 |
562 | func yield(_ progress: CodexReviewProgress) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:707:25: error: 'Mutex' is only available in visionOS 2.0 or newer
700 | }
701 |
702 | private final class TurnReplaySubscriptionCancellation<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
703 | private struct State {
704 | var isCancelled = false
705 | }
706 |
707 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
708 | private let id: UUID
709 | private let registry: TurnReplaySubscriptionRegistry<Channel>
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:707:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
700 | }
701 |
702 | private final class TurnReplaySubscriptionCancellation<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
703 | private struct State {
704 | var isCancelled = false
705 | }
706 |
707 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
708 | private let id: UUID
709 | private let registry: TurnReplaySubscriptionRegistry<Channel>
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:43:18: error: 'withLock' is only available in visionOS 2.0 or newer
37 | }
38 |
39 | private final class TurnReplayPendingWritePhase: Sendable {
| `- note: add '@available' attribute to enclosing class
40 | private let accepted = Mutex(false)
41 |
42 | var isWriteAccepted: Bool {
| `- note: add '@available' attribute to enclosing property
43 | accepted.withLock { $0 }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
44 | }
45 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:47:18: error: 'withLock' is only available in visionOS 2.0 or newer
37 | }
38 |
39 | private final class TurnReplayPendingWritePhase: Sendable {
| `- note: add '@available' attribute to enclosing class
40 | private let accepted = Mutex(false)
41 |
:
44 | }
45 |
46 | func acceptWrite() {
| `- note: add '@available' attribute to enclosing instance method
47 | accepted.withLock { accepted in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
48 | precondition(
49 | accepted == false,
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:57:18: error: 'withLock' is only available in visionOS 2.0 or newer
37 | }
38 |
39 | private final class TurnReplayPendingWritePhase: Sendable {
| `- note: add '@available' attribute to enclosing class
40 | private let accepted = Mutex(false)
41 |
:
54 | }
55 |
56 | func rejectAcceptedWrite() {
| `- note: add '@available' attribute to enclosing instance method
57 | accepted.withLock { accepted in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
58 | precondition(
59 | accepted,
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:393:28: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
390 | private let state = Mutex(State())
391 |
392 | func yield(_ event: CodexTurnEvent, accumulatedSnapshot: CodexTurnSnapshot) {
| `- note: add '@available' attribute to enclosing instance method
393 | let waiter = state.withLock { state -> CheckedContinuation<CodexTurnEvent?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
394 | guard case .open = state.phase else {
395 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:419:28: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
416 | }
417 |
418 | func finish(with compactSnapshot: CompactTurnSnapshot) {
| `- note: add '@available' attribute to enclosing instance method
419 | let waiter = state.withLock { state -> CheckedContinuation<CodexTurnEvent?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
420 | switch state.phase {
421 | case .open:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:444:28: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
441 | }
442 |
443 | func finish(throwing error: CodexAppServerError) {
| `- note: add '@available' attribute to enclosing instance method
444 | let waiter = state.withLock { state -> CheckedContinuation<CodexTurnEvent?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
445 | switch state.phase {
446 | case .open:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:471:39: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
462 | }
463 |
464 | func next(
| `- note: add '@available' attribute to enclosing instance method
465 | cancellation: TurnReplaySubscriptionCancellation<TurnReplayEventSubscriberChannel>
466 | ) async throws -> CodexTurnEvent? {
:
469 | return try await withTaskCancellationHandler {
470 | try await withCheckedThrowingContinuation { continuation in
471 | let immediate = state.withLock { state -> Result<CodexTurnEvent?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
472 | if state.pending.isEmpty == false {
473 | let event = state.pending.removeFirst()
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:504:28: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
501 | }
502 |
503 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
504 | let waiter = state.withLock { state -> CheckedContinuation<CodexTurnEvent?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
505 | guard case .cancelled = state.phase else {
506 | if case .finished = state.phase {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:521:15: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
518 | }
519 |
520 | func overflowCountForTesting() -> Int {
| `- note: add '@available' attribute to enclosing instance method
521 | state.withLock { $0.overflowCount }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
522 | }
523 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:525:15: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
522 | }
523 |
524 | private func tryBeginNext() -> Bool {
| `- note: add '@available' attribute to enclosing instance method
525 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
526 | guard state.nextIsActive == false else {
527 | return false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:535:15: error: 'withLock' is only available in visionOS 2.0 or newer
368 | }
369 |
370 | private final class TurnReplayEventSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
371 | typealias Element = CodexTurnEvent
372 |
:
532 | }
533 |
534 | private func endNext() {
| `- note: add '@available' attribute to enclosing instance method
535 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
536 | precondition(state.nextIsActive)
537 | state.nextIsActive = false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:563:28: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
560 | private let state = Mutex(State())
561 |
562 | func yield(_ progress: CodexReviewProgress) {
| `- note: add '@available' attribute to enclosing instance method
563 | let waiter = state.withLock { state -> CheckedContinuation<CodexReviewProgress?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
564 | guard case .open = state.phase else {
565 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:578:28: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
575 | }
576 |
577 | func finish(with outcome: CodexTurnOutcome) {
| `- note: add '@available' attribute to enclosing instance method
578 | let waiter = state.withLock { state -> CheckedContinuation<CodexReviewProgress?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
579 | switch state.phase {
580 | case .open:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:606:28: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
603 | }
604 |
605 | func finish(throwing error: CodexAppServerError) {
| `- note: add '@available' attribute to enclosing instance method
606 | let waiter = state.withLock { state -> CheckedContinuation<CodexReviewProgress?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
607 | switch state.phase {
608 | case .open:
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:636:39: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
624 | }
625 |
626 | func next(
| `- note: add '@available' attribute to enclosing instance method
627 | cancellation: TurnReplaySubscriptionCancellation<TurnReplayProgressSubscriberChannel>
628 | ) async throws -> CodexReviewProgress? {
:
634 | return try await withTaskCancellationHandler {
635 | try await withCheckedThrowingContinuation { continuation in
636 | let immediate = state.withLock { state -> Result<CodexReviewProgress?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
637 | if let progress = state.newestProgress {
638 | state.newestProgress = nil
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:666:28: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
663 | }
664 |
665 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
666 | let waiter = state.withLock { state -> CheckedContinuation<CodexReviewProgress?, Error>? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
667 | guard case .cancelled = state.phase else {
668 | if case .finished = state.phase {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:685:15: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
682 | func overflowCountForTesting() -> Int { 0 }
683 |
684 | private func tryBeginNext() -> Bool {
| `- note: add '@available' attribute to enclosing instance method
685 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
686 | guard state.nextIsActive == false else {
687 | return false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:695:15: error: 'withLock' is only available in visionOS 2.0 or newer
540 | }
541 |
542 | private final class TurnReplayProgressSubscriberChannel: TurnReplaySubscriberChannel {
| `- note: add '@available' attribute to enclosing class
543 | typealias Element = CodexReviewProgress
544 |
:
692 | }
693 |
694 | private func endNext() {
| `- note: add '@available' attribute to enclosing instance method
695 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
696 | precondition(state.nextIsActive)
697 | state.nextIsActive = false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:717:34: error: 'withLock' is only available in visionOS 2.0 or newer
700 | }
701 |
702 | private final class TurnReplaySubscriptionCancellation<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
703 | private struct State {
704 | var isCancelled = false
:
714 | }
715 |
716 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
717 | let shouldRemove = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
718 | guard state.isCancelled == false else {
719 | return false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:763:18: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
754 | private let delivery = Mutex(())
755 |
756 | func makeSubscription(
| `- note: add '@available' attribute to enclosing instance method
757 | makeChannel: () -> Channel,
758 | prepareForPublication: (Channel) -> Void = { _ in }
:
761 | let channel = makeChannel()
762 | let cancellation = TurnReplaySubscriptionCancellation(id: id, registry: self)
763 | delivery.withLock { _ in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
764 | precondition(
765 | state.withLock { $0.isFinished == false },
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:765:23: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
754 | private let delivery = Mutex(())
755 |
756 | func makeSubscription(
| `- note: add '@available' attribute to enclosing instance method
757 | makeChannel: () -> Channel,
758 | prepareForPublication: (Channel) -> Void = { _ in }
:
763 | delivery.withLock { _ in
764 | precondition(
765 | state.withLock { $0.isFinished == false },
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
766 | "Late replay must come from handle state."
767 | )
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:769:19: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
754 | private let delivery = Mutex(())
755 |
756 | func makeSubscription(
| `- note: add '@available' attribute to enclosing instance method
757 | makeChannel: () -> Channel,
758 | prepareForPublication: (Channel) -> Void = { _ in }
:
767 | )
768 | prepareForPublication(channel)
769 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
770 | precondition(
771 | state.isFinished == false,
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:784:18: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
779 |
780 | @discardableResult
781 | func yield(
| `- note: add '@available' attribute to enclosing instance method
782 | _ body: (Channel) -> Void
783 | ) -> Int {
784 | delivery.withLock { _ in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
785 | let channels = state.withLock { state -> [Channel] in
786 | guard state.isFinished == false else {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:785:34: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
779 |
780 | @discardableResult
781 | func yield(
| `- note: add '@available' attribute to enclosing instance method
782 | _ body: (Channel) -> Void
783 | ) -> Int {
784 | delivery.withLock { _ in
785 | let channels = state.withLock { state -> [Channel] in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
786 | guard state.isFinished == false else {
787 | return []
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:802:29: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
799 | }
800 |
801 | func remove(_ id: UUID) {
| `- note: add '@available' attribute to enclosing instance method
802 | let channel = state.withLock { $0.channels.removeValue(forKey: id) }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
803 | channel?.cancel()
804 | }
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:809:18: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
804 | }
805 |
806 | func finish(
| `- note: add '@available' attribute to enclosing instance method
807 | _ body: (Channel) -> Void
808 | ) {
809 | delivery.withLock { _ in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
810 | let channels = state.withLock { state -> [Channel] in
811 | guard state.isFinished == false else {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:810:34: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
804 | }
805 |
806 | func finish(
| `- note: add '@available' attribute to enclosing instance method
807 | _ body: (Channel) -> Void
808 | ) {
809 | delivery.withLock { _ in
810 | let channels = state.withLock { state -> [Channel] in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
811 | guard state.isFinished == false else {
812 | return []
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift:826:30: error: 'withLock' is only available in visionOS 2.0 or newer
732 | }
733 |
734 | private final class TurnReplaySubscriptionRegistry<Channel: TurnReplaySubscriberChannel>: Sendable {
| `- note: add '@available' attribute to enclosing generic class
735 | private struct State {
736 | var channels: [UUID: Channel] = [:]
:
823 | }
824 |
825 | func cancelAll() {
| `- note: add '@available' attribute to enclosing instance method
826 | let channels = state.withLock { state -> [Channel] in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
827 | let channels = Array(state.channels.values)
828 | state.channels.removeAll(keepingCapacity: false)
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayCore.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile TurnReplayCore.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/TurnReplayStore.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile TurnReplayStore.swift
SwiftCompile normal arm64 Compiling\ AppServerNotificationDecoder.swift,\ AppServerProcessTransport.swift,\ AppServerRequests.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerNotificationDecoder.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerRequests.swift (in target 'CodexAppServerKit' from project 'CodexKit')
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:573:25: error: 'Mutex' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
571 | }
572 |
573 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
574 |
575 | func next() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:573:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
571 | }
572 |
573 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
574 |
575 | func next() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:646:25: error: 'Mutex' is only available in visionOS 2.0 or newer
637 | }
638 |
639 | private final class AppServerReadEventWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
640 | private enum State {
641 | case pending(CheckedContinuation<AppServerReadEvent, Never>?)
:
644 |
645 | let id = UUID()
646 | private let state = Mutex<State>(.pending(nil))
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
647 |
648 | func wait() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:646:36: error: 'init(_:)' is only available in visionOS 2.0 or newer
637 | }
638 |
639 | private final class AppServerReadEventWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
640 | private enum State {
641 | case pending(CheckedContinuation<AppServerReadEvent, Never>?)
:
644 |
645 | let id = UUID()
646 | private let state = Mutex<State>(.pending(nil))
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
647 |
648 | func wait() async -> AppServerReadEvent {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:864:25: error: 'Mutex' is only available in visionOS 2.0 or newer
856 | }
857 |
858 | private final class AppServerCancellationCompletion: Sendable {
| `- note: add '@available' attribute to enclosing class
859 | private enum State {
860 | case pending([CheckedContinuation<Void, Never>])
:
862 | }
863 |
864 | private let state = Mutex<State>(.pending([]))
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
865 |
866 | func wait() async {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:864:36: error: 'init(_:)' is only available in visionOS 2.0 or newer
856 | }
857 |
858 | private final class AppServerCancellationCompletion: Sendable {
| `- note: add '@available' attribute to enclosing class
859 | private enum State {
860 | case pending([CheckedContinuation<Void, Never>])
:
862 | }
863 |
864 | private let state = Mutex<State>(.pending([]))
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
865 |
866 | func wait() async {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:695:24: error: 'Mutex' is only available in visionOS 2.0 or newer
686 | }
687 |
688 | private final class AppServerPipeReadEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
689 | private struct State {
690 | var source: DispatchSourceRead?
:
693 | private let signal = AppServerOneBitReadSignal()
694 | private let cancellationCompletion = AppServerCancellationCompletion()
695 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
696 |
697 | init(
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:761:25: error: 'Mutex' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
759 | }
760 |
761 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
762 |
763 | func beginChunk(byteCount: Int) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:761:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
759 | }
760 |
761 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
762 |
763 | func beginChunk(byteCount: Int) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:814:24: error: 'Mutex' is only available in visionOS 2.0 or newer
805 | }
806 |
807 | private final class AppServerProcessExitEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
808 | private struct State {
809 | var source: DispatchSourceProcess?
:
812 | private let signal = AppServerOneBitReadSignal()
813 | private let cancellationCompletion = AppServerCancellationCompletion()
814 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
815 |
816 | init(processIdentifier: pid_t) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:906:24: error: 'Mutex' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
904 | }
905 |
906 | private let state: Mutex<State>
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
907 |
908 | package init(fileHandle: FileHandle) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1121:29: error: 'Mutex' is only available in visionOS 2.0 or newer
1110 | }
1111 |
1112 | private final class AppServerSpawnedProcess: @unchecked Sendable {
| `- note: add '@available' attribute to enclosing class
1113 | let processIdentifier: pid_t
1114 |
:
1119 | var reapSystemCallCount = 0
1120 | }
1121 | private let exitState = Mutex(ExitState())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
1122 |
1123 | private init(processIdentifier: pid_t) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1121:29: error: 'init(_:)' is only available in visionOS 2.0 or newer
1110 | }
1111 |
1112 | private final class AppServerSpawnedProcess: @unchecked Sendable {
| `- note: add '@available' attribute to enclosing class
1113 | let processIdentifier: pid_t
1114 |
:
1119 | var reapSystemCallCount = 0
1120 | }
1121 | private let exitState = Mutex(ExitState())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
1122 |
1123 | private init(processIdentifier: pid_t) {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1590:25: error: 'Mutex' is only available in visionOS 2.0 or newer
1581 | }
1582 |
1583 | package final class ProcessTerminationToken: Sendable {
| `- note: add '@available' attribute to enclosing class
1584 | private struct State {
1585 | var didRequestTermination = false
:
1588 |
1589 | private let processGroupID: pid_t?
1590 | private let state = Mutex(State())
| `- error: 'Mutex' is only available in visionOS 2.0 or newer
1591 | private let terminationRequestSignal = AppServerOneBitReadSignal()
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:1590:25: error: 'init(_:)' is only available in visionOS 2.0 or newer
1581 | }
1582 |
1583 | package final class ProcessTerminationToken: Sendable {
| `- note: add '@available' attribute to enclosing class
1584 | private struct State {
1585 | var didRequestTermination = false
:
1588 |
1589 | private let processGroupID: pid_t?
1590 | private let state = Mutex(State())
| `- error: 'init(_:)' is only available in visionOS 2.0 or newer
1591 | private let terminationRequestSignal = AppServerOneBitReadSignal()
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:580:31: error: 'withLock' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
573 | private let state = Mutex(State())
574 |
575 | func next() async -> AppServerReadEvent {
| `- note: add '@available' attribute to enclosing instance method
576 | if Task.isCancelled {
577 | return .cancelled
578 | }
579 | let waiter = AppServerReadEventWaiter()
580 | let immediate = state.withLock { state -> AppServerReadEvent? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
581 | if state.hasPendingReadiness {
582 | state.hasPendingReadiness = false
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:596:15: error: 'withLock' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
573 | private let state = Mutex(State())
574 |
575 | func next() async -> AppServerReadEvent {
| `- note: add '@available' attribute to enclosing instance method
576 | if Task.isCancelled {
577 | return .cancelled
:
594 | }
595 | let event = await waiter.wait()
596 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
597 | if state.waiter?.id == waiter.id {
598 | state.waiter = nil
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:605:28: error: 'withLock' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
602 | }
603 |
604 | func signalReadiness() {
| `- note: add '@available' attribute to enclosing instance method
605 | let waiter = state.withLock { state -> AppServerReadEventWaiter? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
606 | guard state.isCancelled == false else {
607 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:617:19: error: 'withLock' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
602 | }
603 |
604 | func signalReadiness() {
| `- note: add '@available' attribute to enclosing instance method
605 | let waiter = state.withLock { state -> AppServerReadEventWaiter? in
606 | guard state.isCancelled == false else {
:
615 | }
616 | if let waiter, waiter.resolve(.ready) == false {
617 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
618 | if state.isCancelled == false {
619 | state.hasPendingReadiness = true
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:626:28: error: 'withLock' is only available in visionOS 2.0 or newer
564 | }
565 |
566 | private final class AppServerOneBitReadSignal: Sendable {
| `- note: add '@available' attribute to enclosing class
567 | private struct State {
568 | var hasPendingReadiness = false
:
623 | }
624 |
625 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
626 | let waiter = state.withLock { state -> AppServerReadEventWaiter? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
627 | guard state.isCancelled == false else {
628 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:651:39: error: 'withLock' is only available in visionOS 2.0 or newer
637 | }
638 |
639 | private final class AppServerReadEventWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
640 | private enum State {
641 | case pending(CheckedContinuation<AppServerReadEvent, Never>?)
:
646 | private let state = Mutex<State>(.pending(nil))
647 |
648 | func wait() async -> AppServerReadEvent {
| `- note: add '@available' attribute to enclosing instance method
649 | await withTaskCancellationHandler {
650 | await withCheckedContinuation { continuation in
651 | let immediate = state.withLock { state -> AppServerReadEvent? in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
652 | switch state {
653 | case .pending(nil):
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:673:28: error: 'withLock' is only available in visionOS 2.0 or newer
637 | }
638 |
639 | private final class AppServerReadEventWaiter: Sendable {
| `- note: add '@available' attribute to enclosing class
640 | private enum State {
641 | case pending(CheckedContinuation<AppServerReadEvent, Never>?)
:
670 |
671 | @discardableResult
672 | func resolve(_ event: AppServerReadEvent) -> Bool {
| `- note: add '@available' attribute to enclosing instance method
673 | let result = state.withLock {
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
674 | state -> (Bool, CheckedContinuation<AppServerReadEvent, Never>?) in
675 | switch state {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:707:22: error: 'Mutex' is only available in visionOS 2.0 or newer
686 | }
687 |
688 | private final class AppServerPipeReadEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
689 | private struct State {
690 | var source: DispatchSourceRead?
:
695 | private let state: Mutex<State>
696 |
697 | init(
| `- note: add '@available' attribute to enclosing initializer
698 | fileHandle: FileHandle,
699 | label: String,
:
705 | queue: queue
706 | )
707 | self.state = Mutex(.init(source: source))
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
708 | let signal = signal
709 | source.setEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:707:22: error: 'init(_:)' is only available in visionOS 2.0 or newer
686 | }
687 |
688 | private final class AppServerPipeReadEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
689 | private struct State {
690 | var source: DispatchSourceRead?
:
695 | private let state: Mutex<State>
696 |
697 | init(
| `- note: add '@available' attribute to enclosing initializer
698 | fileHandle: FileHandle,
699 | label: String,
:
705 | queue: queue
706 | )
707 | self.state = Mutex(.init(source: source))
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
708 | let signal = signal
709 | source.setEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:731:28: error: 'withLock' is only available in visionOS 2.0 or newer
686 | }
687 |
688 | private final class AppServerPipeReadEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
689 | private struct State {
690 | var source: DispatchSourceRead?
:
728 | }
729 |
730 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
731 | let source = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
732 | defer { state.source = nil }
733 | return state.source
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:764:15: error: 'withLock' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
761 | private let state = Mutex(State())
762 |
763 | func beginChunk(byteCount: Int) {
| `- note: add '@available' attribute to enclosing instance method
764 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
765 | precondition(
766 | state.currentChunkRemainderByteCount == 0,
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:776:15: error: 'withLock' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
773 | }
774 |
775 | func updateRemainder(byteCount: Int) {
| `- note: add '@available' attribute to enclosing instance method
776 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
777 | precondition(byteCount >= 0)
778 | state.currentChunkRemainderByteCount = byteCount
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:783:15: error: 'withLock' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
780 | }
781 |
782 | func dropRemainder(byteCount: Int) {
| `- note: add '@available' attribute to enclosing instance method
783 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
784 | precondition(byteCount >= 0)
785 | state.droppedRemainderByteCount += byteCount
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:791:15: error: 'withLock' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
788 | }
789 |
790 | func sourceCancellationCompleted() {
| `- note: add '@available' attribute to enclosing instance method
791 | state.withLock { $0.didCompleteSourceCancellation = true }
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
792 | }
793 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:795:15: error: 'withLock' is only available in visionOS 2.0 or newer
750 | }
751 |
752 | private final class AppServerStdoutReadMetrics: Sendable {
| `- note: add '@available' attribute to enclosing class
753 | private struct State {
754 | var successfulReadCount = 0
:
792 | }
793 |
794 | func snapshot() -> AppServerStdoutReadSnapshot {
| `- note: add '@available' attribute to enclosing instance method
795 | state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
796 | .init(
797 | successfulReadCount: state.successfulReadCount,
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:823:22: error: 'Mutex' is only available in visionOS 2.0 or newer
805 | }
806 |
807 | private final class AppServerProcessExitEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
808 | private struct State {
809 | var source: DispatchSourceProcess?
:
814 | private let state: Mutex<State>
815 |
816 | init(processIdentifier: pid_t) {
| `- note: add '@available' attribute to enclosing initializer
817 | let queue = DispatchQueue(label: "CodexAppServerKit.app-server-process-exit")
818 | let source = DispatchSource.makeProcessSource(
:
821 | queue: queue
822 | )
823 | self.state = Mutex(.init(source: source))
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
824 | let signal = signal
825 | source.setEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:823:22: error: 'init(_:)' is only available in visionOS 2.0 or newer
805 | }
806 |
807 | private final class AppServerProcessExitEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
808 | private struct State {
809 | var source: DispatchSourceProcess?
:
814 | private let state: Mutex<State>
815 |
816 | init(processIdentifier: pid_t) {
| `- note: add '@available' attribute to enclosing initializer
817 | let queue = DispatchQueue(label: "CodexAppServerKit.app-server-process-exit")
818 | let source = DispatchSource.makeProcessSource(
:
821 | queue: queue
822 | )
823 | self.state = Mutex(.init(source: source))
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
824 | let signal = signal
825 | source.setEventHandler {
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:845:28: error: 'withLock' is only available in visionOS 2.0 or newer
805 | }
806 |
807 | private final class AppServerProcessExitEventSource: Sendable {
| `- note: add '@available' attribute to enclosing class
808 | private struct State {
809 | var source: DispatchSourceProcess?
:
842 | }
843 |
844 | func cancel() {
| `- note: add '@available' attribute to enclosing instance method
845 | let source = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
846 | defer { state.source = nil }
847 | return state.source
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:868:36: error: 'withLock' is only available in visionOS 2.0 or newer
856 | }
857 |
858 | private final class AppServerCancellationCompletion: Sendable {
| `- note: add '@available' attribute to enclosing class
859 | private enum State {
860 | case pending([CheckedContinuation<Void, Never>])
:
864 | private let state = Mutex<State>(.pending([]))
865 |
866 | func wait() async {
| `- note: add '@available' attribute to enclosing instance method
867 | await withCheckedContinuation { continuation in
868 | let isComplete = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
869 | switch state {
870 | case .pending(var waiters):
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:885:29: error: 'withLock' is only available in visionOS 2.0 or newer
856 | }
857 |
858 | private final class AppServerCancellationCompletion: Sendable {
| `- note: add '@available' attribute to enclosing class
859 | private enum State {
860 | case pending([CheckedContinuation<Void, Never>])
:
882 | }
883 |
884 | func complete() {
| `- note: add '@available' attribute to enclosing instance method
885 | let waiters = state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
886 | switch state {
887 | case .pending(let waiters):
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:909:22: error: 'Mutex' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
906 | private let state: Mutex<State>
907 |
908 | package init(fileHandle: FileHandle) {
| `- note: add '@available' attribute to enclosing initializer
909 | self.state = Mutex(.init(fileHandle: fileHandle, writeOverride: nil))
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
910 | }
911 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:909:22: error: 'init(_:)' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
906 | private let state: Mutex<State>
907 |
908 | package init(fileHandle: FileHandle) {
| `- note: add '@available' attribute to enclosing initializer
909 | self.state = Mutex(.init(fileHandle: fileHandle, writeOverride: nil))
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
910 | }
911 |
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:916:22: error: 'Mutex' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
910 | }
911 |
912 | package init(
| `- note: add '@available' attribute to enclosing initializer
913 | fileHandle: FileHandle,
914 | writeOverride: @escaping @Sendable (Data) throws -> Void
915 | ) {
916 | self.state = Mutex(.init(
| |- error: 'Mutex' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
917 | fileHandle: fileHandle,
918 | writeOverride: writeOverride
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:916:22: error: 'init(_:)' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
910 | }
911 |
912 | package init(
| `- note: add '@available' attribute to enclosing initializer
913 | fileHandle: FileHandle,
914 | writeOverride: @escaping @Sendable (Data) throws -> Void
915 | ) {
916 | self.state = Mutex(.init(
| |- error: 'init(_:)' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
917 | fileHandle: fileHandle,
918 | writeOverride: writeOverride
/Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift:923:19: error: 'withLock' is only available in visionOS 2.0 or newer
898 | }
899 |
900 | package final class AppServerJSONRPCWriter: Sendable {
| `- note: add '@available' attribute to enclosing class
901 | private struct State {
902 | var fileHandle: FileHandle?
:
920 | }
921 |
922 | package func write(_ data: Data) throws {
| `- note: add '@available' attribute to enclosing instance method
923 | try state.withLock { state in
| |- error: 'withLock' is only available in visionOS 2.0 or newer
| `- note: add 'if #available' version check
924 | guard let fileHandle = state.fileHandle else {
925 | throw JSONRPC.Error.closed
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerNotificationDecoder.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile AppServerNotificationDecoder.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerProcessTransport.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile AppServerProcessTransport.swift
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/AppServerRequests.swift (in target 'CodexAppServerKit' from project 'CodexKit')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile AppServerRequests.swift
SwiftEmitModule normal arm64 Emitting\ module\ for\ AsyncAlgorithms (in target 'AsyncAlgorithms' from project 'swift-async-algorithms')
SwiftCompile normal arm64 (in target 'AsyncAlgorithms' from project 'swift-async-algorithms')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/ExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules
2026-09-26 18:51:01.609 xcodebuild[891:5248] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
** BUILD FAILED **
The following build commands failed:
SwiftCompile normal arm64 Compiling\ InterruptRaceResolver.swift,\ JSONRPC.swift,\ JSONRPCEnvelopeCodec.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/InterruptRaceResolver.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPC.swift /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift (in target 'CodexAppServerKit' from project 'CodexKit')
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/CodexAppServerKit/JSONRPCEnvelopeCodec.swift (in target 'CodexAppServerKit' from project 'CodexKit')
Building workspace CodexKit with scheme CodexKit-Package
(3 failures)
BUILD FAILURE 6.4 visionOS