siom79 / japicmp

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

Release 0.15.1 differs from 0.14.4, treats new annotation file as incompatible #279

Closed jhy closed 3 years ago

jhy commented 3 years ago

Thanks for releasing 0.15.1, I was just moving jsoup to it (from 0.14.4) but found that the new version reports a new annotation as a breaking change (for source compatibility).

Version 14.4:

<class binaryCompatible="true" changeStatus="NEW"
 fullyQualifiedName="org.jsoup.internal.FieldsAreNonnullByDefault" 
javaObjectSerializationCompatible="NOT_SERIALIZABLE" javaObjectSerializationCompatibleAsString="not serializable"
sourceCompatible="true">

Version 15.1:

<class binaryCompatible="true" changeStatus="NEW" 
fullyQualifiedName="org.jsoup.internal.FieldsAreNonnullByDefault" javaObjectSerializationCompatible="NOT_SERIALIZABLE"
javaObjectSerializationCompatibleAsString="not serializable"
sourceCompatible="false">

The actual new annotation is at https://github.com/jhy/jsoup/blob/master/src/main/java/org/jsoup/internal/FieldsAreNonnullByDefault.java . I believe (hope!) this is a binary and source compatible change?

In the full XML report, every line item for the class is marked as both source and binary compatible, in both versions.

Also, in the HTML report, in 15 it is marked source incompatible with a (*), but the text is green. I expected it to be red, and it took a while to find it.

Is this a bug from japicmp updating its dependencies, or is this an actual source compatibility issue that I've misunderstood?

Thanks, Jonathan

jhy commented 3 years ago

japicmp.zip

Attached the reports from both japicmp versions. The only change between runs was the depended version.

garydgregory commented 3 years ago

Is 0.15.x going to be on Maven Central?

siom79 commented 3 years ago

@garydgregory Yes, japicmp 0.15.1 is available on Maven Central.

@jhy After upgrading all the dependencies one test case failed and I "fixed" it. But it looks like the "fix" introduced another issue. The japicmp 0.15 report shows the change METHOD_ABSTRACT_ADDED_IN_IMPLEMENTED_INTERFACE which is incorrect for a new annotation. I will fix this as soon as possible.

siom79 commented 3 years ago

Fixed: 0.15.2

jhy commented 3 years ago

Awesome, thanks Martin!

With this fix and the fix for JDK 16-ea, I've been able to enable CI builds in jsoup for 16-ea again.

siom79 commented 3 years ago

Thanks. Great to hear that.

Jonathan Hedley notifications@github.com schrieb am Sa., 9. Jan. 2021, 07:12:

Awesome, thanks Martin!

With this fix and the fix for JDK 16-ea, I've been able to enable CI builds in jsoup for 16-ea again.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/siom79/japicmp/issues/279#issuecomment-757103775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4U7NAJ7IUAX6QQHSQWXLTSY7XV5ANCNFSM4VO45GSA .