Open Tlaster opened 2 weeks ago
Hey, we’ve changed the behavior that suspend and Flow interop is only enabled when your project has kotlinx coroutines dependency (making sure we don’t add it when not needed). This sounds like a bug in the SKIE resolution logic when it checks dependencies. For now, add dependency on kotlinx-coroutines-core to the module you’re using SKIE in. That should work around the problem. We’ll give your project a look tomorrow to see how we can fix SKIE. Thanks for reporting it!
Thank you for the suggestion! However, adding the dependency on kotlinx-coroutines-core did not resolve the issue.
Hi!
I was able to reproduce the issue. It's indeed a bug in SKIE. The issue is that the library bluesky
has a dependency on SKIE runtime, which is an internal dependency of SKIE and is supposed to be only added by SKIE and not provided by anyone else.
Unfortunately, older versions of SKIE had a bug that caused this dependency to be registered in Maven, which polluted dependencies of some libraries like this one. This extra dependency creates a collision with the runtime added by SKIE and the compiler resolves that collision by ignoring both of them. The only reason why this doesn't crash the compilation is because SKIE checks for the existence of the library during compilation and disables the coroutines features if the runtime is not available.
We will need to implement a workaround in SKIE that accounts for this situation.
In the meantime, I was able to get the project working by changing the api(libs.bluesky)
line in the build.gradle.kts
file of the shared module to:
api(libs.bluesky.get().toString()) {
exclude("co.touchlab.skie")
}
implementation("co.touchlab.skie:runtime-kotlin:${libs.versions.skie.get()}")
Thank you for providing the workaround, it is working correctly now!
I think I'm seeing the same issue, but I don't have a dependency on bluesky. How were you able to figure out which library was causing the problem?.
EDIT: I updated my kotlinx coroutines to 1.9.0-RC (I noticed the Flare repo was on that version) and now it seems to be working.
EDIT: I updated my kotlinx coroutines to 1.9.0-RC (I noticed the Flare repo was on that version) and now it seems to be working.
This seems to be a different problem. Can you please create a separate issue?
I'm a little hesitant because I don't actually know what fixed it/caused it and the codebase is 100% closed source so I can't really provide a repro. If I find time I'll try to walk backwards until the bug re-appears, but I don't just want to clutter your issue tracker with a very low-quality bug report if I can avoid it.
What is the problem?
Flow interop not working since 0.7.0
When does the problem occur?
In
build/skie/binaries/debugFramework/DEBUG/iosSimulatorArm64/swift/generated/Skie
, no flow related source code being generated after 0.7.0. I'm wondering if I've misconfigured the project or if there's something I'm missing.How do we reproduce the issue?
I do have a project but it's not minimal: https://github.com/DimensionDev/Flare
What has changed since the last time SKIE worked in your project?
After upgrading to version 0.7.0 or any subsequent version.
What versions of SKIE, Kotlin, and Gradle do you use?
SKIE: 0.8.2 Kotlin: 2.0 Gradle: 8.8
What is your SKIE Gradle configuration?