apple / swift-nio

Event-driven network application framework for high performance protocol servers & clients, non-blocking.
https://swiftpackageindex.com/apple/swift-nio/documentation
Apache License 2.0
7.94k stars 645 forks source link

macOS build broken (since Snippets) #2749

Closed weissi closed 2 months ago

weissi commented 3 months ago
/Users/johannes/devel/swift-nio/Snippets/NIOFileSystemTour.swift:89:37: error: 'valueForAttribute' is only available in macOS 10.15 or newer
87 |   // Where supported, the extended attributes of a file can also be accessed, read, and modified:
88 |   for attribute in try await directory.attributeNames() {
89 |     let value = try await directory.valueForAttribute(attribute)
   |                                     |- error: 'valueForAttribute' is only available in macOS 10.15 or newer
   |                                     `- note: add 'if #available' version check
90 |     print("Extended attribute '\(attribute)' has value '\(value)'")
91 |   }
[164/183] Linking NIOWebSocketClient
weissi commented 3 months ago

Since #2746 I think

tayloraswift commented 3 months ago

do we need to add platforms: [.macOS(.v14)] to the manifest?

weissi commented 3 months ago

do we need to add platforms: [.macOS(.v14)] to the manifest?

No, that'd be a SemVer major break. It needs if #available or @available(...)

Lukasa commented 3 months ago

Yeah, we should add the appropriate availability guards to the snippet.

Lukasa commented 2 months ago

Resolved by #2750.