-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests on Linux and macOS (#60) #63
Conversation
Hm. I wonder why it fails on the Swift 5.7 image but not on 5.8:
254) #if SBI && swift(>=5.8)
255) @available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
256) #endif
257) public typealias Int128 = NBKDoubleWidth<NBKDoubleWidth<Int>> Edit: I get the same error on Xcode 14.2. That's something at least. |
Is this a Swift 5.7 bug? Here's the surrounding context: #if arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc)
/// A signed, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
#endif // 🚨
public typealias Int128 = NBKDoubleWidth<NBKDoubleWidth<Int>>
/// An unsigned, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
#endif // 🚨
public typealias UInt128 = NBKDoubleWidth<NBKDoubleWidth<UInt>>
#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
/// A signed, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
#endif // ✅
public typealias Int128 = NBKDoubleWidth<Int>
/// An unsigned, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
#endif // ✅
public typealias UInt128 = NBKDoubleWidth<UInt>
#else
#error("NBKDoubleWidth can only be used on a 32-bit or 64-bit platform.")
#endif |
It compiles if I make the following (silly) change: #if arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc)
/// A signed, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
public typealias Int128 = NBKDoubleWidth<NBKDoubleWidth<Int>>
#else // because Swift 5.7 cannot parse it otherwise
public typealias Int128 = NBKDoubleWidth<NBKDoubleWidth<Int>>
#endif // ✅
/// An unsigned, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
public typealias UInt128 = NBKDoubleWidth<NBKDoubleWidth<UInt>>
#else // because Swift 5.7 cannot parse it otherwise
public typealias UInt128 = NBKDoubleWidth<NBKDoubleWidth<UInt>>
#endif // ✅
#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
/// A signed, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
#endif // ✅
public typealias Int128 = NBKDoubleWidth<Int>
/// An unsigned, 128-bit, integer.
#if SBI && swift(>=5.8)
@available(iOS 16.4, macCatalyst 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *)
#endif // ✅
public typealias UInt128 = NBKDoubleWidth<UInt>
#else
#error("NBKDoubleWidth can only be used on a 32-bit or 64-bit platform.")
#endif |
It works on Xcode 14.2 now, but the Linux tests still fail. |
So removing the availability annotations is fine. I feel like I tried this exact thing yesterday and it did not work for whatever reason. I need a vaction. Maybe I also need to try an older OS version? Like macOS 12 or whatnot? |
Just to be clear, the current code works if you set |
I had a great I idea involving a custom |
Somebody, please uninvent semantically significant indentation.