Repository navigation
ci: fail on incompatible API changes against the last stable release - #488
Merged
Merged
Conversation
Runs japicmp after the build against the newest non-RC tag before HEAD and fails on binary or source incompatible changes, unless the major version went up, as on beta. The report is written to the job summary. Refs #461
This was referenced Nov 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #488 +/- ##
=========================================
Coverage 46.70% 46.70%
Complexity 692 692
=========================================
Files 209 209
Lines 6276 6276
Branches 759 759
=========================================
Hits 2931 2931
Misses 2783 2783
Partials 562 562 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1 of the alternative plan discussed in #461.
Adds a CI step that compares the jar built by the build job against the newest non-RC tag before
HEADwith japicmp and fails on any binary or source incompatible change. On a release-tag build the baseline is the release before it, which is already on Maven Central, and RC tags are skipped because they promise nothing. The exception is a version inpom.xmlwith a higher major number than the baseline, as onbeta, where a major line may break the API and the report is for information only. The report is appended to the job summary.The plugin is declared in
pom.xmlbut bound to no build phase, so a plain local build needs no network access. To run the check locally, usemvn package -DskipTests && mvn japicmp:cmp -Dapi.baseline=<last stable release>and read the report intarget/japicmp/. japicmp's own semantic-versioning mode cannot be used here, because between releases the version inpom.xmlstill equals the baseline and in that state the mode rejects even additive changes.The gate is documented in
CONTRIBUTING.mdandAGENTS.md. 414 tests pass, the gate fails when a public method is made package-private and passes for the same change with the break-on-incompatible flag off, and Javadoc, the examples module andci/check-docs.pyall pass.