Benjamin Sejdic
10/25/2024, 9:05 AMcoroutinesInterop enabled using the SKIE library.
Error message: Compilation failed: The /Applications/Xcode-16.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc command returned non-zero exit code: 1.
This error only occurs when we set coroutinesInterop to true and happens specifically during the kotlin framework compilation, in the linking step. Weâre new to SKIE and trying out coroutinesInterop, but havenât been able to get it working yet. We initially stared with the enums feature and it works without issues.
Versions:
* SKIE Version: 0.9.3
* Kotlin Version: 2.0.20
* Xcode Version: 16.0
Gradle Setup:
skie {
features {
group("co.touchlab.skie.types") {
SealedInterop.Enabled(true)
coroutinesInterop.set(true)
SuspendInterop.Enabled(true)
FunctionInterop.FileScopeConversion.Enabled(false)
}
}
}
Weâve also posted this on github (https://github.com/touchlab/SKIE/issues/118) but wanted to ask here in case anyone has tips or has run into similar issue. Any advice or workarounds would be greatly appreciated. Thanks!Tadeas Kriz
10/25/2024, 2:29 PM--info and share more of the swiftc error? You should also be able to navigate to build/skie/binaries/debugFramework/DEBUG/iosSimulatorArm64/debug/logs and there should be swiftc.log file which should contain more details. Please share those so we can see what the error isade
10/27/2024, 11:22 AMDavid Everlöf
10/29/2024, 11:42 AMerror: Compilation failed: The /Applications/Xcode-16.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc command returned non-zero exit code: 1.
output:
/Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift/generated/Watch/Watch.WatchManager.swift:17:19: error: value of type 'Watch' has no member '__SkieSuspendWrappersKt'
15 | public func doInitWatch(watch: watch.Watch) async throws -> Swift.Void {
16 | return try await SwiftCoroutineDispatcher.dispatch {
17 | watch.__SkieSuspendWrappersKt.Skie_Suspend__231__initWatch(dispatchReceiver: self, watch: watch, suspendHandler: $0)
`- error: value of type 'Watch' has no member '__SkieSuspendWrappersKt'
18 | }
19 | }
* Source files:
* Compiler version: 2.0.21
* Output kind: FRAMEWORKTadeas Kriz
10/29/2024, 1:10 PMFunctionInterop.FileScopeConversion.Enabled(false) to true instead, does it compile?David Everlöf
10/29/2024, 1:27 PMDavid Everlöf
10/29/2024, 1:27 PM$ diff /Users/david/Downloads/swiftc.log /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/debug/logs/swiftc.log
49a50,69
> /Applications/Xcode-16.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name watch -import-underlying-module -F /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/cache/kotlin-framework -F /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/fake-objc-frameworks -verify-emitted-module-interface -emit-module -emit-module-path /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/headers/watch.swiftmodule -emit-objc-header -emit-objc-header-path /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/headers/watch-Swift.h -emit-object -parse-as-library -enable-batch-mode -Onone -incremental -output-file-map /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/config/OutputFileMap.json -g -module-cache-path /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/cache/swift-module-cache -swift-version 5 -j9 -sdk /Applications/Xcode-16.0.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -target arm64-apple-ios15.0 @/Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/config/watch.SwiftFileList
>
>
> /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift/generated/Watch/Watch.WatchManager.swift:17:19: error: value of type 'Watch' has no member '__SkieSuspendWrappersKt'
> 15 | public func doInitWatch(watch: watch.Watch) async throws -> Swift.Void {
> 16 | return try await SwiftCoroutineDispatcher.dispatch {
> 17 | watch.__SkieSuspendWrappersKt.Skie_Suspend__231__initWatch(dispatchReceiver: self, watch: watch, suspendHandler: $0)
> | `- error: value of type 'Watch' has no member '__SkieSuspendWrappersKt'
> 18 | }
> 19 | }
> /Applications/Xcode-16.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name watch -import-underlying-module -F /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/cache/kotlin-framework -F /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/fake-objc-frameworks -verify-emitted-module-interface -emit-module -emit-module-path /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/headers/watch.swiftmodule -emit-objc-header -emit-objc-header-path /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/headers/watch-Swift.h -emit-object -parse-as-library -enable-batch-mode -Onone -incremental -output-file-map /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/config/OutputFileMap.json -g -module-cache-path /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/cache/swift-module-cache -swift-version 5 -j9 -sdk /Applications/Xcode-16.0.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -target arm64-apple-ios15.0 @/Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift-compiler/config/watch.SwiftFileList
>
>
> /Users/david/fest/mobilewatchapps/Android/watch/build/skie/binaries/debugFramework/DEBUG/iosArm64/swift/generated/Watch/Watch.WatchManager.swift:17:19: error: value of type 'Watch' has no member '__SkieSuspendWrappersKt'
> 15 | public func doInitWatch(watch: watch.Watch) async throws -> Swift.Void {
> 16 | return try await SwiftCoroutineDispatcher.dispatch {
> 17 | watch.__SkieSuspendWrappersKt.Skie_Suspend__231__initWatch(dispatchReceiver: self, watch: watch, suspendHandler: $0)
> | `- error: value of type 'Watch' has no member '__SkieSuspendWrappersKt'
> 18 | }
> 19 | }Tadeas Kriz
10/29/2024, 1:28 PMfeatures block:
features {
group("co.touchlab.skie.types") {
SealedInterop.Enabled(true)
coroutinesInterop.set(true)
SuspendInterop.Enabled(true)
FunctionInterop.FileScopeConversion.Enabled(false)
}
}Tadeas Kriz
10/29/2024, 1:28 PMTadeas Kriz
10/29/2024, 1:28 PMco.touchlab.skie.types package?David Everlöf
10/29/2024, 1:31 PMgroupTadeas Kriz
10/29/2024, 1:31 PMDavid Everlöf
10/29/2024, 1:32 PMskie?
skie { }Tadeas Kriz
10/29/2024, 1:32 PMTadeas Kriz
10/29/2024, 1:33 PMcoroutinesInterop should be outside of any group as it's for features block. We should probably add DSL annotationsDavid Everlöf
10/29/2024, 1:39 PM__SkieSuspendWrappersKtDavid Everlöf
10/29/2024, 1:39 PMTadeas Kriz
10/29/2024, 1:40 PMDavid Everlöf
10/29/2024, 1:40 PMTadeas Kriz
10/29/2024, 1:42 PMWatch to Watch_ (it's a limitation of Swift)Tadeas Kriz
10/29/2024, 1:43 PMTadeas Kriz
10/29/2024, 1:43 PMwatch and the class is Watch which is fine, but the parameter to doInitWatch is watch and therefore it conflictsTadeas Kriz
10/29/2024, 1:44 PMDavid Everlöf
10/29/2024, 1:44 PMDavid Everlöf
10/29/2024, 1:44 PMTadeas Kriz
10/29/2024, 1:44 PMTadeas Kriz
10/29/2024, 1:45 PMTadeas Kriz
10/29/2024, 1:46 PMpublic func doInitWatch(watch watch_: watch.Watch)David Everlöf
10/29/2024, 1:47 PMTadeas Kriz
10/29/2024, 1:48 PMWatchKit or the parameter)