apple / swift-nio-ssl

TLS Support for SwiftNIO, based on BoringSSL.
https://swiftpackageindex.com/apple/swift-nio-ssl/main/documentation/niossl
Apache License 2.0
385 stars 139 forks source link

Add if #available for xrOS #436

Closed o-nnerb closed 1 year ago

o-nnerb commented 1 year ago

Xcode 14 Beta 2 is warning about using SecTrustEvaluateAsync method

Warning: SecTrustEvaluateAsync' was deprecated in xrOS 1.0: renamed to 'SecTrustEvaluateAsyncWithError(::_:)'

FranzBusch commented 1 year ago

@swift-server-bot test this please

FranzBusch commented 1 year ago

I confirmed this warning locally. Just running the CI to see if we can land this without breaking older Swift versions

FranzBusch commented 1 year ago

@swift-server-bot add to allowlist

o-nnerb commented 1 year ago

@FranzBusch I've updated this. I understand now that this change as effect only in the compilation warning, not the right behavior of the code when running in xrOS. So, my question is, do we need this PR?

FranzBusch commented 1 year ago

This warning is interesting and looks like a compiler bug to me. We are actually taking the correct branch at runtime but we are getting the warning in the wrong branch. I filed an issue for the compiler: https://github.com/apple/swift/issues/66854

o-nnerb commented 1 year ago

I totally agree with you. I will close this PR then. Thanks! Nice chat.