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

Support for overrideCompatibilityChangeParameters #43

Closed
jkwatson opened this issue Apr 26, 2021 · 2 comments · Fixed by #55
Closed

Support for overrideCompatibilityChangeParameters #43

jkwatson opened this issue Apr 26, 2021 · 2 comments · Fixed by #55

Comments

@jkwatson
Copy link

I see this is in the maven plugin, and would love it for the gradle version.

In particular, I would very much like to be able to say that METHOD_NEW_DEFAULT does not count as a binary compatibility change.

Is there any way to do this today with the gradle plugin?

@simonbasle
Copy link
Contributor

simonbasle commented Mar 29, 2022

Same here! I've explored filtering and custom rules for that purpose but it doesn't work. Best I was able to do is modify the level of some Violation in the rich report, but that only makes the rich report empty (the task is still considered a failure because the underlying japicmp call doesn't know of that change).

what would be needed is more of an Excludes configuration like for classes and methods: list categories of changes in the configuration and have the plugin configure japicmp to consider these categories as compatible.

Japicmp (the library, not the plugin) has a japicmp.model.JApiCompatibilityChange enum, and a japicmp.cmp.JarArchiveComparatorOptions.OverrideCompatibilityChange class that can be used in japicmp options to mark a JApiCompatibilityChange as binary/source compatible.

I will submit a PR to that effect.

simonbasle added a commit to simonbasle/japicmp-gradle-plugin that referenced this issue Mar 29, 2022
This commit adds the compatibilityChangeExcludes configuration option
which allows to simply turn well-known `JApiCompatibilityChange` enum
values into compatible changes, effectively excluding all instances
of such violations from the API comparison.

Fixes melix#43.
@shakuzen
Copy link

We'd also be interested in this for Micrometer to accept METHOD_NEW_DEFAULT changes.

@melix melix closed this as completed in #55 Sep 8, 2022
melix pushed a commit that referenced this issue Sep 8, 2022
This commit adds the compatibilityChangeExcludes configuration option
which allows to simply turn well-known `JApiCompatibilityChange` enum
values into compatible changes, effectively excluding all instances
of such violations from the API comparison.

Fixes #43.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants