<@U02SD6B3URH> FYI. I upgraded my KMP project to ...
# touchlab-tools
r
@support FYI. I upgraded my KMP project to 2.0, and from IntelliJ the build failed with a message “Error:” during update of the Gradle project. That’s it — no who/what/where for the origin of this hard failure. After working with JetBrains support, we found it to be related to the attempt to use SKIE 0.6.4, and when I upgraded that today to 0.8.0, that mysterious failure went away. Problem solved, but the error diagnostic, or lack thereof, was misleading (to say the least) and may be something you want to be aware of or correct for folks upgrading to Kotlin 2.0 .
k
SKIE 0.6.4 makes some build log that tells you its not going to work:
Copy code
Error:
SKIE 0.6.4 does not support Kotlin 2.0.0.
Supported versions are: [1.8.0, 1.8.10, 1.8.20, 1.8.21, 1.8.22, 1.9.0, 1.9.10, 1.9.20, 1.9.21, 1.9.22, 1.9.23].
Check if you have the most recent version of SKIE and if so, please wait for the SKIE developers to add support for this Kotlin version.
New Kotlin versions are usually supported within a few days after they are released.
Note that there are no plans for supporting early access versions like Beta, RC, etc.
SKIE cannot not be used until this error is resolved.
SKIE 0.7.+ seems to have an earlier check in the configuration setup so the log output is very near the top and is more obvious when looking for what's wrong. In both cases it doesn't fail the build when it probably should, but maybe there was a good reason for not failing?
f
Hi! Yeah, SKIE will throw this as an error only if you try to actually run the K/N link task. Otherwise it’s a soft error. This is so that we don’t break the project sync and other tasks if it’s not needed (so that people can for example try newer Kotlin versions for Android and so on). However, now that I look at the implementation I see that there might be a bug in the implementation which may cause the error not being correctly thrown in certain situations (but the red warning should be there in all cases).
k
Could we have a property to set some kind of strict mode so it does fail project sync?
touchlab.skie.configuration.strict=true
in
gradle.properties
, something like that? I'd enable it so its obvious to new devs joining the team who try kotlin versions and don't know to upgrade SKIE. And also when dependabot/other bots make PRs to upgrade Kotlin so I can get an early failure that I need to upgrade SKIE too
If its better to make a github issue / feature request for it, happy to do so 🙂
f
Sure, the only reason this doesn’t exist is because we didn’t though that there would be a use case for it. I’ll add this to my todo. (No need for creating a Github issue in this case)
k
And honestly if you're open to it, it sounds like a simple change, I could contribute it
f
We are open to contributions. However, in this case I have to fix the bug in the implementation anyway so it wouldn’t save me time 😄
🙌 1
In the end I decided that it will be an opt out instead of an opt in. So starting from 0.8.1 SKIE will crash even during the sync if it’s not compatible with the Kotlin version (unless SKIE is explicitly disabled).
🎉 1