Skip to content
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

0.29.0 causes KLIB resolver issue #278

Closed
crysxd opened this issue Jan 22, 2025 · 6 comments
Closed

0.29.0 causes KLIB resolver issue #278

crysxd opened this issue Jan 22, 2025 · 6 comments

Comments

@crysxd
Copy link

crysxd commented Jan 22, 2025

I tried using this library but 0.29.0 causes following error when building iOS on all of our machines:

e: KLIB resolver: Could not find "/Users/dev/.gradle/caches/modules-2/files-2.1/com.mikepenz/multiplatform-markdown-renderer-iossimulatorarm64/0.29.0/29ddd9710e5f8d50b9d6d9cccde4124d3cdb58b7/multiplatform-markdown-renderer-iosSimulatorArm64Main-0.29.0.klib" in [/Users/dev/ci/vsts-agent/_work/1/s, /Users/dev/.konan/klib, /Users/dev/.konan/kotlin-native-prebuilt-macos-aarch64-2.0.21/klib/common, /Users/dev/.konan/kotlin-native-prebuilt-macos-aarch64-2.0.21/klib/platform/ios_simulator_arm64]

Switching to 0.28.0 works as expected, is there something wrong with the deployment of 0.29.0?
Might well be something on our side, but I never encountered such an issue before and as its reproducible on multiple machines I'm not sure what to make of that...

This is more to document the issue, in case we are the only one experiencing it I don't think any action is required. Thank you for this beautiful library

@mikepenz
Copy link
Owner

mikepenz commented Jan 22, 2025

The release of 0.29.0 will require the project to use Kotlin 2.x or newer: https://github.com/mikepenz/multiplatform-markdown-renderer/releases/tag/v0.29.0

There is a change in how Kotlin publishes libraries and as a result it requires the integrating app to use Kotlin 2.x as well

@crysxd
Copy link
Author

crysxd commented Jan 22, 2025

Thanks for the reply! We are already on 2.0.21
Which might actually be the problem? Because I see the error message contains the exact Kotlin version. I see 0.29.0 is targeting 2.1, maybe this makes it incompatible with 2.0.x

@mikepenz
Copy link
Owner

mikepenz commented Jan 22, 2025

🤔 can you please do a test? I would expect it to work with 2.0.x.

oh actually. I think the following happens:

Image via https://www.liutikas.net/2025/01/10/Conservative-Librarian.html

Will need to update the changelog to reflect 2.1.x is needed

@crysxd
Copy link
Author

crysxd commented Jan 22, 2025

You refer to this section?

.klib artifacts produced by KGP 2.1.0 cannot be consumed by library users that use KGP 2.0.0 even if you set the target language version above.

We are unfortunately unable to upgrade to 2.1 at the moment due to an issue with SKIE. I think if you indicate that 2.1 is require in the changelog this is good enough for now as we can stick with 0.28.0 until the SKIE issue is resolved.

I think as long as you are using klib the consumer of your library is required to use the same Kotlin version. I'm not sure how this would be the other way round, e.g. if your lib would be 2.0 and we would be 2.1. My assumption would be that it would work this way round, but if not that would be quite a bummer.

Thank you for your prompt response on this!

@crysxd crysxd closed this as completed Jan 22, 2025
@mikepenz
Copy link
Owner

Thank you very much for the feedback.

I really need to re-think if there's something that can be done. overall I attempt to keep things updated, to not fall behind, but it causing such difficulties for integrators is not a great experience either.

@crysxd
Copy link
Author

crysxd commented Jan 22, 2025

Yeah, I think generally it's a great approach and generally we do the same. Unfortunately, the SKIE issue caused us to be stuck with 2.0 until the issue is resolved (not a great situation).

Generally, having an old library version for an old Kotlin version sounds acceptable to me. What threw me off was the very bad error given by the Kotlin compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants