Skip to content

Add support for guessing version numbers to CLI invocations#467

Merged
siom79 merged 2 commits intosiom79:masterfrom
jonahgraham:guess-version-in-cli
Nov 23, 2025
Merged

Add support for guessing version numbers to CLI invocations#467
siom79 merged 2 commits intosiom79:masterfrom
jonahgraham:guess-version-in-cli

Conversation

@jonahgraham
Copy link
Contributor

Moved the guessVersion method from the maven plug-in to the core japicmp and use it to guess version of jars when using CLI

I was trying to use --error-on-semantic-incompatibility from the CLI, but because there seems to be no way to pass version numbers in to the CLI for new and old jars I put together this PR in the hope this is a reasonable way to achieve what I am looking to do.

Moved the guessVersion method from the maven plug-in to the core
japicmp and use it to guess version of jars when using CLI
@siom79
Copy link
Owner

siom79 commented Nov 19, 2025

Thank you for the PR and work.
One build failed with /home/runner/work/japicmp/japicmp/japicmp/src/test/java/japicmp/util/FileHelperTest.java:[45,91] cannot find symbol.

Optional.isEmpty was introduced in Java 11 and the code needs to
operate on Java 8 still, including the tests.
@jonahgraham
Copy link
Contributor Author

Thanks @siom79 for the initial review. I have corrected the use of Java 11 API in the test.

@siom79 siom79 merged commit c640748 into siom79:master Nov 23, 2025
6 checks passed
@siom79
Copy link
Owner

siom79 commented Nov 23, 2025

Released with 0.25.0.

@jonahgraham jonahgraham deleted the guess-version-in-cli branch November 23, 2025 23:52
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.

2 participants