Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JapiCmp: avoid misses, improve reporting and exclusions #162

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

simonbasle
Copy link
Member

This commit improves the japicmp integration in the build:

  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.

This report is called out in the "how to fix" tip in the CI preliminary
step.

  1. 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).

  1. Update japicmp-gradle-plugin, exclude NEW_DEFAULT_METHOD as a whole

Since japicmp-grale-plugin v0.4.1 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.

This commit improves the japicmp integration in the build:

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.

This report is called out in the "how to fix" tip in the CI preliminary
step.

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) Update japicmp-gradle-plugin, exclude NEW_DEFAULT_METHOD as a whole

Since japicmp-grale-plugin v0.4.1 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.
@simonbasle simonbasle added this to the 0.2.x Backlog milestone Sep 21, 2022
@simonbasle simonbasle added the type/chore A task not related to code (build, formatting, process, ...) label Sep 21, 2022
@simonbasle simonbasle self-assigned this Sep 21, 2022
@simonbasle simonbasle requested a review from a team September 21, 2022 16:05
@simonbasle simonbasle merged commit 16aa37b into 0.2.x Sep 28, 2022
@reactorbot
Copy link

@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 🙇

@simonbasle simonbasle deleted the improveJapiCmpBuild branch September 28, 2022 12:24
simonbasle added a commit that referenced this pull request Sep 28, 2022
@violetagg violetagg modified the milestones: 0.2.x Backlog, 0.2.10 Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants