swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

Add visionOS to `@available` annotations where we use them

Open simonjbeaumont opened this issue 2 years ago • 0 comments

While the current Linux toolchains are happy to have visionOS in the platforms: in Package.swift, it seems they don't it being mentioned in the list of platforms in an @available annotation yet.

We tried to add it to the URLSession transport in https://github.com/apple/swift-openapi-urlsession/pull/41. This succeeds in the latest Xcode release (15.0.1), but it fails in our Linux CI.

/code/Sources/OpenAPIURLSession/BufferedStream/BufferedStream.swift:1010:53: error: unrecognized platform name 'visionOS'
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, visionOS 1, *)

Note, this is only a warning but, because we compile with -warnings-as-errors, it gets promoted by the CI, and there's no current way to selectively opt-out of errors on a per-error or per-file basis.

We'll backlog this issue to post-1.0 and pick it up when we have it available for use in the Linux toolchain.

simonjbeaumont avatar Dec 01 '23 13:12 simonjbeaumont