Kotlin / binary-compatibility-validator

Public API management tool
Apache License 2.0
759 stars 55 forks source link

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

Closed fzhinkin closed 1 week ago

fzhinkin commented 1 week ago

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:

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.