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

Enable Hierarchical Projects (HMPP) support #110

Closed
twyatt opened this issue Feb 2, 2021 · 8 comments · Fixed by #112
Closed

Enable Hierarchical Projects (HMPP) support #110

twyatt opened this issue Feb 2, 2021 · 8 comments · Fixed by #112

Comments

@twyatt
Copy link
Contributor

twyatt commented Feb 2, 2021

Similar to touchlab/Stately#46, HMPP is needed in order for downstream consumers of this library to enable HMPP.

See JuulLabs/kable#63 as an example (failed) attempt to enable HMPP downstream of this library.

@twyatt twyatt changed the title Enabled Hierarchical Projects (HMPP) support Enable Hierarchical Projects (HMPP) support Feb 2, 2021
@benasher44
Copy link
Owner

benasher44 commented Feb 2, 2021

My understanding was that this doesn't work for user-defined libraries yet: https://youtrack.jetbrains.com/issue/KT-40975. Though, JuulLabs/kable's test PR seems to prove otherwise. Will this break non-HMPP consumers of 1.4+?

@benasher44
Copy link
Owner

Regardless, given how close we are to 1.4.30 release, I think I'll include support for this in the 1.4.30 release

@twyatt
Copy link
Contributor Author

twyatt commented Feb 2, 2021

Will this break non-HMPP consumers of 1.4+

My understanding is that it is backwards compatible (or at least there is another flag that can make it backwards compatible). If I can find the time, I'll try to look into this to confirm and see if I can find the flag that I'm thinking of.

@benasher44
Copy link
Owner

I asked Kotlin folks, and the "compatibility variant" needs to be enabled to support non-HMPP clients. Here's an example:

https://github.com/ktorio/ktor/blob/master/gradle.properties#L80-L81

They're working on correcting the docs for this.

@twyatt
Copy link
Contributor Author

twyatt commented Feb 3, 2021

I asked Kotlin folks, and the "compatibility variant" needs to be enabled to support non-HMPP clients.

Nice! You beat me to it. I found a kotlinlang Slack thread that also discusses the enableCompatibilityMetadataVariant flag, and reaffirms your findings.

@russhwolf
Copy link

russhwolf commented Feb 4, 2021

FYI I currently don't have any of this stuff enabled in Multiplatform Settings largely because the 1.4.20 release blog mentioned better compatibility with people on older Kotlin versions or who don't enable hmpp themselves if it's disabled in the library https://blog.jetbrains.com/kotlin/2020/11/kotlin-1-4-20-released/#updated-structure-of-multiplatform-library-publications

Because I never had a reply in that Slack thread, I don't know whether kotlin.mpp.enableCompatibilityMetadataVariant=true alleviates that.

@benasher44
Copy link
Owner

kotlin.mpp.enableCompatibilityMetadataVariant=true should alleviate it. The issue is that the newer model has a different metadata format that's incompatible. That flag will additionally publish the old format, as I understand it.

@benasher44
Copy link
Owner

Should be fixed in 0.2.4

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

Successfully merging a pull request may close this issue.

3 participants