e

    eygraber

    4 months ago
    What determines the value of
    isCompatibilityMetadataVariantEnabled
    in
    kotlin-tooling-metadata.json
    ? I'm seeing it set to
    true
    in all of the dependencies that I use (e.g. coroutines), except for a library that I publish (e.g. portal), where it is
    false
    .
    russhwolf

    russhwolf

    4 months ago
    Oh I forgot to ask about that in the call earlier. The default for the related gradle parameter apparently changed in 1.6.20 but I'm not clear on whether it's still relevant or not
    In the early hmpp days it was a way to make sure you're compatible with consumers regardless of whether they have hmpp enabled.
    kpgalligan

    kpgalligan

    4 months ago
    I added it into Kermit because somebody was having issues digesting the dependency: https://github.com/touchlab/Kermit/blob/e69d519009601789fea5bed85063848e82721499/gradle.properties#L47
    I’m still pretty confused by the various versions and what is/isn’t needed, but it did seem to solve that person’s issue.
    Sebastian Sellmair [JB]

    Sebastian Sellmair [JB]

    4 months ago
    isCompatibilityMetadataVariantEnabled will determine if a HMPP (1.6.20+) library will support non hmpp consumers for tooling. As explained in the last meeting: In hmpp, every source set gets compiled into a ‘metadata klib’ and then published. Those artifacts can only be read by projects also using hmpp! Pre-HMPP multiplatform uses a
    .koltin_metadata
    format, which is becoming obsolete! A library with this setting enabled will still support projects that did not enable (or explicitly disable HMPP!
    e

    eygraber

    4 months ago
    Is there any harm in keeping it enabled in libraries that have already upgraded to 1.6.21? So that consumers of the library aren't forced to enable HMPP (for whatever reason).
    Sebastian Sellmair [JB]

    Sebastian Sellmair [JB]

    4 months ago
    Feel free to choose enabling this in your libraries! There should not be a lot of harm done, but I am more than happy that this legacy mode is fading out ☺️
    e

    eygraber

    4 months ago
    If I have a project that has HMPP disabled, would
    enableCompatibilityMetadataVariant
    be needed so that project module dependencies work correctly?
    Sebastian Sellmair [JB]

    Sebastian Sellmair [JB]

    4 months ago
    No, iirc this property does not do anything when hmpp is disabled! For what reasons exactly did you have do disable hmpp on your end?
    e

    eygraber

    4 months ago
    I don't have any use case, just curious about how it works 😅
    kpgalligan

    kpgalligan

    4 months ago
    There should not be a lot of harm done, but I am more than happy that this legacy mode is fading out
    To clarify, it’s fading out because as people upgrade Kotlin to 1.6.20+ it goes away automatically? Also, is there zero harm, or like a bit of “harm” and what would that be?