Kotlin / binary-compatibility-validator

Public API management tool
Apache License 2.0
829 stars 60 forks source link

Improve error message for incompatible metadata versions #129

Open FenstonSingel opened 1 year ago

FenstonSingel commented 1 year ago

Right now the error message for incompatible metadata versions, at it seems, effectively uses the Kotlin repository's Kotlin version as maximally supported one, even though the actual maximum is usually one minor version up.

The inconsistency can be reproduced with the latest BCV (0.13.1) as follows: when trying to build API for a project compiled with LV 1.9, everything goes okay, but trying to do the same for a project compiled with LV 2.0 leads to the following error:

Incompatible version of Kotlin metadata.
Maximal supported Kotlin metadata version: 1.8.0,
ProjectMainKt Kotlin metadata version: 2.0.0.
As a workaround, it is possible to manually update 'kotlinx-metadata-jvm' version in your project.
aSemy commented 6 months ago

This issue would be helped if BCV used an isolated classpath - similar to https://github.com/Kotlin/binary-compatibility-validator/issues/208