SKIE icon indicating copy to clipboard operation
SKIE copied to clipboard

What is the minimum Swift version supported by SKIE?

Open nicopico-dev opened this issue 1 year ago • 2 comments

I get error like the following when using SKIE:

error: expected ',' separator
internal func bridgeSubscriptionCount(_ subscriptionCount: any Skie.org_jetbrains_kotlinx__kotlinx_coroutines_core.StateFlow.__Kotlin) -> SkieSwiftStateFlow<KotlinInt> {
                                                               ^

This construction seems to be allowed since Swift 5.7, but I am locked on XCode 13 with my old MacBook Pro :-/

nicopico-dev avatar Oct 05 '23 21:10 nicopico-dev

Hi! In theory, this depends on whether you use coroutines interop or not. Without it, it might even work with Swift 4.0 (you can try that by completely turning off the interop). The coroutines interop requires at least 5.5 because this version introduces the async keyword. But because of our implementation, it's probably 5.6, maybe 5.7.

The main problem is that we test only against Swift 5.7. We are currently working on new tests that will run against different Xcode versions, so then I will be able to give you a definitive answer.

We don't have an internally agreed upon minimum target Swift version yet. (We are waiting on the tests.) But I don't know if we will end up supporting Xcode 13. Supporting more versions means extra work, so we must weigh the extra work against other features. And I'm not sure there will be enough demand for it because not many people use it. (You can't install it on Ventura, and I think that since April, you can't even use it to publish apps to the App Store.)

FilipDolnik avatar Oct 06 '23 16:10 FilipDolnik

Hi Filip, thanks for your answer.

I understand completely that supporting XCode 13 is not a priority don't worry :) My toy project seems to build when coroutines interop is disabled.

skie {
    features {
        coroutinesInterop.set(false)
    }
}

Too bad this is the feature I was most interested to test. This might be the final push to finally make me buy a new MacBook 😅

nicopico-dev avatar Oct 07 '23 16:10 nicopico-dev

I added the minimum supported Swift version to the documentation.

FilipDolnik avatar Jun 03 '24 10:06 FilipDolnik