Better wording and comments for klib compatibility code

This commit is contained in:
Alexander Gorshenev
2020-11-06 14:41:50 +03:00
parent 891a4c4621
commit 5f2a963006
2 changed files with 3 additions and 1 deletions
@@ -36,6 +36,8 @@ data class KotlinAbiVersion(val major: Int, val minor: Int, val patch: Int) {
fun isCompatible(): Boolean = isCompatibleTo(CURRENT)
private fun isCompatibleTo(ourVersion: KotlinAbiVersion): Boolean {
// Versions before 1.4.1 were the active development phase.
// Starting with 1.4.1 we are trying to maintain some backward compatibility.
return if (this.isAtLeast(1, 4, 1))
major == ourVersion.major && minor <= ourVersion.minor
else
@@ -225,7 +225,7 @@ abstract class KotlinLibraryProperResolverWithAttributes<L : KotlinLibrary>(
val candidateLibraryVersion = candidate.versions.libraryVersion
if (candidateAbiVersion?.isCompatible() != true) {
logger.warning("skipping $candidatePath. Incompatible abi version. Expected '${KotlinAbiVersion.CURRENT}', found '${candidateAbiVersion}'. The library produced by ${candidateCompilerVersion} compiler")
logger.warning("skipping $candidatePath. Incompatible abi version. The current default is '${KotlinAbiVersion.CURRENT}', found '${candidateAbiVersion}'. The library produced by ${candidateCompilerVersion} compiler")
return false
}