Add a binary-compatibility check to catch unintended ABI breaks between releases
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- build-system
Research direction
Start by inspecting the Groovy Gradle configuration for the java-spiffe-core and java-spiffe-provider modules and how published artifacts are resolved from Maven Central. Configure the japicmp Gradle plugin to compare each module with its last release, then verify the build flags an incompatible public API change while allowing documented intentional breaks through an explicit allowlist and changelog note.
Written by the indexing model from the issue text.
Description
Some releases change the public binary API without it being flagged as a breaking change, which surfaces for consumers as a runtime NoSuchMethodError/NoClassDefFoundError (from a jar compiled against the previous version) rather than a compile error that would be caught early.
The clearest recent example is 0.8.15: #377 removed Lombok and hand-wrote the builders, which renamed the generated builder class DefaultX509Source.X509SourceOptions.X509SourceOptionsBuilder → Builder. Code compiled against <= 0.8.14 then fails at runtime against >= 0.8.15:
java.lang.NoSuchMethodError: 'io.spiffe.workloadapi.DefaultX509Source$X509SourceOptions$X509SourceOptionsBuilder io.spiffe.workloadapi.DefaultX509Source$X509SourceOptions.builder()'
It was listed under "Dependency updates" in the 0.8.15 notes, so the ABI impact appears to have been unintentional.
Proposal
Add a binary-compatibility gate to the build that diffs each build's public API against the last published release and fails on binary-incompatible changes, applied to the consumer-facing modules (java-spiffe-core, java-spiffe-provider).
For this repo specifically (Groovy Gradle, pure Java, multi-module, published to Maven Central via com.vanniktech.maven.publish), the japicmp Gradle plugin looks like the best fit: it applies per subproject and can resolve the previous release from Maven Central as the baseline automatically, so there's no per-release config to maintain. revapi is a more powerful alternative if richer rules are ever needed, though it is likely heavier than this project requires.
This wouldn't block intentional breaking changes; it would make them explicit (an allowlist entry plus a changelog note) instead of silent, so consumers can plan for them.
We're happy to open a PR to wire this up.
- Dominant language
- Java
- Stars
- 46
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spiffe/java-spiffe
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
spiffe/java-spiffe#466 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
spiffe/java-spiffe#108 · 1 reaction ·
-
spiffe/java-spiffe#106 · 2 reactions · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spiffe/java-spiffe#80 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spiffe/java-spiffe#79 · 2 comments ·
All issues in spiffe/java-spiffe
Similar issues
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Openarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100