-
Notifications
You must be signed in to change notification settings - Fork 56
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
only scan relevant classpaths for metadata #681
Conversation
You confirm it still finds and loads sevntu's YML? |
Unrelated but |
@rnveach It finds that package when the sevntu plugin is running: However, neither on master nor on my branch any metadata file is found by scanning the classpath. Regarding the reflections library: If you know a good alternative, then please raise an issue for replacing reflections.org. Don't be confused, I will probably add it to the target platform in another PR soon, where I'm working on consuming the checkstyle.jar instead of the checkstyle-all.jar. Adding it is only to move the dependency to this project instead of taking it transitively from checkstyle. |
I assume this is related to other issues/comments on the matter as sevntu has been broken for a while. I am just confused if you say it won't load the YML or if it won't load something else?
I believe Reflections right now is just doing the very basic load (common java code), so I would recommend doing that. No extra library needed. I do not remember the specifics as it has been a while since I originally looked into it. |
It doesn't find any YML. So there is no loading. |
Thanks. So this probably related to the reflections library. Since it doesn't work properly in Java 9+, it isn't finding anything. |
* Classgraph is used in other Eclipse projects like Xtext, too, and is actively maintained. * Now finds the sevntu YML files again (which the previous reflections based code did not find at all). fixes checkstyle#515 fixes checkstyle#682
75d4bed
to
37c95ac
Compare
@rnveach I've changed the implementation, and now the classgraph library is used instead. It finds the sevntu checks, but unfortunately it still uses 7 seconds of CPU time. Nevertheless I consider this change fixing both the performance gap as well as the reflections issue. |
I'm going to merge this and the 2 PRs that are based on it. Feel free to still review and comment, so I can address comments separately, if necessary. However, I have some more classpath related changes (like trying to use the slim checkstyle.jar and to remove the guava dependencies) coming up, and all these changes are in conflict with each other because they change how the different plugin projects depend on each other. |
This still finds all relevant metadata files, but takes 480 ms instead of 12 seconds on my laptop.
fixes #515