siom79 / japicmp

Comparison of two versions of a jar archive
https://siom79.github.io/japicmp
Apache License 2.0
708 stars 107 forks source link

some newer kotlin changes show up as a binary string #370

Closed hgschmie closed 7 months ago

hgschmie commented 8 months ago

Thank you for japicmp! This is a great tool!

When comparing some kotlin classes, I got a report like this:

Screenshot 2024-01-20 at 09 27 11

This is with kotlin 1.6.21, kotlin plugin 1.9.22, kotlin api version compat to 1.6. I use JDK 21, compiling to JDK 11 compatibility.

Let me know if you need more information; I am evaluating japicmp for a project and I can poke a various things if that helps track down the problem.

siom79 commented 7 months ago

As far as I know the kotlin compiler introduces this annotation to classes in order to track some internal information. The format of the annotation seems to be defined here. d1 seems to be an array of String, but looks like some binary data here. For more details you must consult a Kotlin developer.

hgschmie commented 7 months ago

given that the plugin supports kotlin, shouldn't it either ignore the Metadata file (which seems to be internal and compiler generated) or show more comprehensive information?

siom79 commented 7 months ago

Does japicmp support Kotlin? 😉 As far as I know there is no comprehensive spec for the annotation. And what should be the use case? Its meaning should be transparent for the user.