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

KLib dumps merge: support dumps with different library names #249

Open
fzhinkin opened this issue Jul 8, 2024 · 2 comments
Open

KLib dumps merge: support dumps with different library names #249

fzhinkin opened this issue Jul 8, 2024 · 2 comments
Labels
enhancement New feature or request klib

Comments

@fzhinkin
Copy link
Collaborator

fzhinkin commented Jul 8, 2024

Currently, KLib dumps generated for several targets won't be merged with an error if these dumps contain different "unique library names".

In some cases, namely Kotlin Stdlib, the same library may use different unique names depending on the target.

It's worth considering how such a case could be handled by the BCV.

@fzhinkin fzhinkin added enhancement New feature or request klib labels Jul 8, 2024
@hfhbd
Copy link

hfhbd commented Sep 9, 2024

We at sqldelight got the same error, we use the (deprecated) archivesBaseName to specify the js module name: https://github.com/cashapp/sqldelight/pull/5444/files#r1750539059

A failure occurred while executing kotlinx.validation.KlibMergeAbiWorker
      > File header doesn't match the header of other files
        [// Rendering settings:, // - Signature version: 2, // - Show manifest properties: true, // - Show declarations: true, , // Library unique name: <app.cash.sqldelight:sqldelight-primitive-adapters>]
        
        
        [// Rendering settings:, // - Signature version: 2, // - Show manifest properties: true, // - Show declarations: true, , // Library unique name: <app.cash.sqldelight:primitive-adapters>]

The solution for our use-case for JS

kotlin {
  js {
    moduleName = "sqldelight-primitive-adapters"
  }
}

does not work with convention plugins (will create a youtrack issue too: https://youtrack.jetbrains.com/issue/KT-71362/KGP-JS-moduleName-is-not-compatible-with-convention-plugins).

@ZacSweers
Copy link

Here is another repro: amzn/kotlin-inject-anvil#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request klib
Projects
None yet
Development

No branches or pull requests

3 participants