-
Notifications
You must be signed in to change notification settings - Fork 7
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
Reduce usage of Guava #199
Comments
- Replace LinkedList with ArrayList or ArrayDeque Part of kieler#199
- Replace LinkedList with ArrayList or ArrayDeque Part of kieler#199
One question regarding compatibility: It looks like KLighD uses Guava's Predicate and Function type in some of its APIs. Since Java-1.8 they have a (almost) drop-in replacement in the |
If we are to remove Guava, KLighD will deprecate the current API first, eventually removing it probably during a major version update. I try to keep semantic versioning a thing, especially for the APIs for using KLighD outside of Eclipse. |
- Replace LinkedList with ArrayList or ArrayDeque Part of kieler#199
That's reasonable. I have looked further into this topic and I think the main work will be reworking the 'Iterables'-Pipelines to Stream-Pipelines, then replacing some Multimaps and Guava's Predicate and Function. Most of the latter is trivial if their implementations are converted to lambdas and in general most of that seems doable (even with Java-1.8), What could be a bit difficult is replacing some advanced Set-Diff views, but I think even that can be achieved in the end. It will probably just be that for that particular use case the code using only standard Java might become a bit longer than before. |
- Replace LinkedList with ArrayList or ArrayDeque Part of kieler#199
- Replace LinkedList with ArrayList or ArrayDeque Part of kieler#199
Guava is a great library that brought many great new features into the Java world. But many of them are now part of the Java standard library, either directly or indirectly through other new features. When using Java-11 or later, many of the conveniences provided by Guava can be replaced with standard Java with the same level of convenience.
At the same time Guava can be a difficult dependency in the OSGi world (like Eclipse) because of its frequent major versions and because it is often reexported.
In unfortunate situations this can prevent updates of other dependencies of an application.
Therefore I want to propose to reduce the usage of Guava, eventually it might even be possible to drop Guava entirely.
If you are interested I can provide corresponding PRs to replace uses Guava step by step, where possible.
The text was updated successfully, but these errors were encountered: