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

BCV behavior for an empty module is inconsistent between JVM and KMP #243

Closed
fzhinkin opened this issue Jun 25, 2024 · 0 comments · Fixed by #244
Closed

BCV behavior for an empty module is inconsistent between JVM and KMP #243

fzhinkin opened this issue Jun 25, 2024 · 0 comments · Fixed by #244
Labels
bug Something isn't working

Comments

@fzhinkin
Copy link
Collaborator

When applied to K/JVM module, BCV require to create an API dump even if a module does not have any "production" sources (for instance, it's a test-only module).

At the same time, if it's KMP module, BCV simply ignores the module (instead of reporting an error and asking to create an empty dump).

KLib support complicated the matter:

  • in 0.15.0-Beta.{1,2} such a module will be ignored, the same way it's done for JVM ABI validation;
  • develop branch contains what should become 0.15.0-Beta.3 and KLib validation fails for an empty module (the same way it would fail for a K/JVM empty module).

BCV should validation should behave consistently for both JVM and KLib ABI as well as both K/JVM and KMP projects.
Current JVM ABI validation behavior for KMP projects seems to be incorrect as sources removal will lead to the :apiCheck task being skipped instead of it being executed and failed.

@fzhinkin fzhinkin added the bug Something isn't working label Jun 25, 2024
fzhinkin added a commit that referenced this issue Jun 25, 2024
Currently, only JVM ABI validation in KMP projects
allows having no dump file. In other cases (JVM ABI
validation in K/JVM project or KLib validation) require
the presence of an ABI dump file. Lack of such a file
is treated as a validation error.

The main motivation for having a dump files instead of
simply ignoring such projects is that otherwise BCV
won't be able to catch the case when all sources
were removed from a project.

Fixes #243
@fzhinkin fzhinkin linked a pull request Jun 25, 2024 that will close this issue
ALikhachev added a commit to Kotlin/kotlinx.serialization that referenced this issue Jul 23, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.
sandwwraith pushed a commit to Kotlin/kotlinx.serialization that referenced this issue Jul 23, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.
sandwwraith pushed a commit to Kotlin/kotlinx.serialization that referenced this issue Aug 1, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.

Cherry-picked from 46f406d
sandwwraith added a commit to Kotlin/kotlinx.serialization that referenced this issue Aug 5, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.

Cherry-picked from 46f406d

Co-authored-by: Alexander Likhachev <alikhachev@users.noreply.github.com>
woainikk pushed a commit to Kotlin/kotlinx.serialization that referenced this issue Aug 7, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.
woainikk added a commit to Kotlin/kotlinx.serialization that referenced this issue Aug 7, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.
woainikk pushed a commit to Kotlin/kotlinx.serialization that referenced this issue Aug 26, 2024
This is required to ensure compatibility of the build with Kotlin 2.1+ after resolving https://youtrack.jetbrains.com/issue/KT-61706
Adds kotlinx-serialization-json-tests to ignored projects: Kotlin/binary-compatibility-validator#243
Reorders entries in dumps: Kotlin/binary-compatibility-validator#225, Kotlin/binary-compatibility-validator#196
The entries are only reordered, but contain no significant changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant