reactor-core icon indicating copy to clipboard operation
reactor-core copied to clipboard

Improve JapiCmp: avoid misses, improve reporting and exclusions

Open simonbasle opened this issue 3 years ago • 3 comments
trafficstars

This PR improves the japicmp integration in the build in several ways:

  1. Add a finalizedBy task that prints a filtered report The basic text report uses * and ! as markers for binary and source incompatible changes respectively. Additionally, a MODIFIED class is marked with ***. This task attempts at pinpointing the incompatible changes only in the report, and printing these lines.

  2. Ensure sourceModified changes are considered See reactor/reactor#722. If a change is binary compatible but not source compatible, using onlyBinaryCompatibleModified = true will mask the issue. This change uses onlyModified = true instead. This is slightly more verbose, but this is alleviated by (1).

  3. Bump to japicmp plugin v0.4.1, exclude NEW_DEFAULT_METHOD as a whole The new compatibilityChangeExcludes parameter allows us to ignore all occurrences of a default method added to an interface, instead of having to exclude each such method one by one.

The fourth commit demonstrates the console report and its filtering, and shows that out of the two added interface methods, only the non-default one is reported.

simonbasle avatar Sep 21 '22 09:09 simonbasle

output example can be seen in https://github.com/reactor/reactor-core/actions/runs/3097449417

simonbasle avatar Sep 21 '22 11:09 simonbasle

The GH Summary part represent a lot of code for something that can be easily groked from the logs, and it will need some adaptation when copying these changes into other repos. I've removed that aspect.

simonbasle avatar Sep 21 '22 13:09 simonbasle

reference for the interpretation of japicmp.txt report: https://github.com/siom79/japicmp/blob/master/japicmp/src/main/java/japicmp/output/stdout/StdoutOutputGenerator.java#L92

simonbasle avatar Sep 21 '22 14:09 simonbasle

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main :bow:

reactorbot avatar Sep 28 '22 12:09 reactorbot