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

Fix for issue #359 - >=0.16.0: Cannot compare versions because the number of old versions is different than the number of new versions #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kambed
Copy link

@kambed kambed commented Feb 19, 2024

Issue was created in pull: #333

It causes to not work correctly in some cases in big, multi module projects. Case was described by @martinaldrin in #359.

Issue can be solved by changing on line as is was before pull #333. Please review @siom79, and consider merging and deploying, for now we are blocked and we cannot go over version 0.15.6 in our projects.

@@ -296,7 +296,6 @@ public List<CtClass> filterClasses(List<CtClass> ctClasses, ReducibleClassPool c
LOGGER.fine(String.format("Adding class '%s' with jar name '%s' to list.", ctClass.getName(), ctClass.getName()));
}
} else {
classPool.remove(ctClass);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary. The issue is about old code that no longer is called / has been removed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 0.18.5 we get error: Execution default-cli of goal com.github.siom79.japicmp:japicmp-maven-plugin:0.18.5:cmp failed: Could not load 'com.....C***': com.....C***. Please make sure that all libraries have been added to the classpath (CLASSPATH=:/r***...:) or try the option '--ignore-missing-classes'.
After removing above line it starts to work again. Please check.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a concrete example to reproduce? The message Please make sure that all libraries have been added to the classpath ... is normally printed when the class is NOT on the classpath. It would be an error if it actually is on the classpath; hence, I would need a concrete example.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw: The code here filters the classes by the configured filters. Are you sure that there is not filter configured, that excludes the mentioned class?

@kambed kambed requested a review from siom79 February 26, 2024 10:27
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