← 输入框|github.com|刷新
Skip to content

ci: fail on incompatible API changes against the last stable release - #488

Merged
dargmuesli merged 1 commit into
mainfrom
ci/api-compatibility
Nov 4, 2026
Merged

dargmuesli merged 1 commit into
mainfrom
ci/api-compatibility

Conversation

@dargmuesli

Copy link
Copy Markdown
Member

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 HEAD with 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 in pom.xml with a higher major number than the baseline, as on beta, 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.xml but bound to no build phase, so a plain local build needs no network access. To run the check locally, use mvn package -DskipTests && mvn japicmp:cmp -Dapi.baseline=<last stable release> and read the report in target/japicmp/. japicmp's own semantic-versioning mode cannot be used here, because between releases the version in pom.xml still equals the baseline and in that state the mode rejects even additive changes.

The gate is documented in CONTRIBUTING.md and AGENTS.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 and ci/check-docs.py all pass.

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

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.70%. Comparing base (64986e1) to head (f4ea563).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dargmuesli
dargmuesli merged commit 7923243 into main Nov 4, 2026
11 checks passed
@dargmuesli
dargmuesli deleted the ci/api-compatibility branch November 4, 2026 10:34
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 this pull request may close these issues.

1 participant