swift-nio icon indicating copy to clipboard operation
swift-nio copied to clipboard

Support for Vision

Open felswa opened this issue 1 year ago • 2 comments

Hi. In certain places like Source/NIOFileSystem/FileSystem there is:

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android)

Can you please add os(visionOS) to this across the project. Thanks.

felswa avatar Oct 02 '24 12:10 felswa

@glbrntt we should replace the Apple OSes with canImport(Darwin)

Lukasa avatar Oct 02 '24 13:10 Lukasa

The #if os(...) guards in all of the file system code were to work around Swift System not knowing about visionOS (see: https://github.com/apple/swift-nio/pull/2636).

However, support for visionOS was added in Swift System 1.3.0.

I think the fix here should be to:

  1. remove the top-level #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) from the file system code,
  2. bump the minimum version of swift-system required to 1.3.0
  3. remove the conditional dependency on swift-system from Package.swift

glbrntt avatar Oct 02 '24 14:10 glbrntt

In light of commit Issue-2900 - Add VisionOS support #2947, can this be closed or is further testing needed?

mpapple-swift avatar Oct 24 '24 17:10 mpapple-swift

I think we can close this.

Lukasa avatar Oct 24 '24 17:10 Lukasa