Skip to content

6.18.1 - a platform nothing compiled for

Choose a tag to compare

@superuser404notfound superuser404notfound released this 09 Aug 18:37
· 873 commits to main since this release

One compile fix for visionOS, plus the CI job that should have caught it. Drop-in from 6.18.0, no API change, no platform minimum moves.

* is not "anything newer"

Three availability lists named tvOS, iOS and macOS and let everything else fall through to *:

guard #available(tvOS 17.4, iOS 17.4, macOS 14.4, *) else { return }

For a platform the list does not name, * resolves to that platform's declared floor in Package.swift, and the engine declares .visionOS(.v1). All three APIs behind those lists arrived in visionOS 1.1:

  • AVSampleBufferDisplayLayer.isReadyForDisplay
  • AVSampleBufferDisplayLayerReadyForDisplayDidChange
  • AVSampleBufferVideoRenderer.videoPerformanceMetrics

So visionOS did not take a runtime fallback, it failed to compile, on that platform and on no other:

Sources/AetherEngine/Native/SoftwarePlaybackHost.swift:383: error: 'AVSampleBufferDisplayLayerReadyForDisplayDidChange' is only available in visionOS 1.1 or newer
Sources/AetherEngine/Native/SoftwarePlaybackHost.swift:389: error: 'isReadyForDisplay' is only available in visionOS 1.1 or newer
Sources/AetherEngine/Renderer/SampleBufferRenderer.swift:170: error: 'loadVideoPerformanceMetrics(completionHandler:)' is only available in visionOS 1.1 or newer

Guards, not a floor raise

The other available fix is to declare .visionOS(.v1_1), and it is the wrong one. Raising platforms: breaks every consumer that still declares the old minimum: SwiftPM picks the version first and checks the platform floor afterwards, so such a consumer does not resolve back to an older tag, its build fails outright. LibDovi 1.1.0 did exactly that to every AetherEngine 5.x tag in July, which is why a floor raise is a major release here.

Each list names visionOS 1.1 instead, .visionOS(.v1) stays, and visionOS 1.0 takes the same fallbacks tvOS/iOS below 17.4 already take: isVideoReadyForDisplay comes from the first frame handed to the renderer rather than from the layer's own readyForDisplay, and loadRenderMetrics() returns nil. The #unavailable twin got visionOS 1.1 as well. It has to mirror the observer's list exactly, because a platform named on one side only lands in the gap between both branches and publishes no readiness at all.

Why it shipped

visionOS has been declared since 6.0.0 and CI built tvOS, iOS and macOS only, so nothing here ever compiled the platform, and there is no Vision Pro on this side to notice. CI now builds the visionOS Simulator next to the other two, and the bug form offers visionOS, which the reporter had to work around by filing under iOS.

Verified: visionOS Simulator builds clean for both AetherEngine and AetherEngineSMB (0 errors, 0 warnings), tvOS Simulator unchanged, 1686 tests in 246 suites pass.

Reported by @YangHanqing in #344.