-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Make dependency to Okhttp as optional #427
Comments
Assuming we have enought time and resources (which is rather scarce lately) we could replace Okhttp with the built in JDK The loaders are part of Moneta-core and I don't think, it could be easily broken up into further modules beyond what is already pretty decoupled. The The Moneta release intended to have Java 11 as the minimum JDK is 1.5, see #409. |
I don't know moneta features because in our app we use only a couple of simple standard classes/interfaces. I've looked into a code and there is already PS. Probably for me enough would be to mark all OkHttp imports in |
I guess in the manifest it may have been overlooked. We could mark it as optional and remove the reference to URLConnectionLoaderService, which should be removed by 1.4.5. |
I reopen an issue from #404.
While the dependency on jakarta.annotation-api is not very problematic, the dependency on okhttp is (these libraries do not have versions as OSGi bundles). Why the need to introduce this dependency from version 1.4.3, it was not there before?
Is it necessary to work always, or only for certain selected functions of moneta-core and could it be optional (Import-package optional)?
BTW:
Generally, using a 3rd party library in such a fairly generic library as Moneta, which in practice provides the appropriate data types, is a bit problematic, if it is not some very standard library. And Okhttp is not a standard one, especially since there are many different http client libraries. If we use different dependencies of this type in the application, such as moneta-core, then in the end it turns out that they transitively pull many different libraries and it often ends with our application suddenly having several different types of libraries for the same purpose (e.g. http client).
I do not know which feature in moneta-core requires http client and whether every application of this library uses it (I suspect it is not necessary). It would probably be better if such http client, if necessary, was pluggable via some interface and we could plug-in any implementation or none at all, if our application does not use this feature.
The text was updated successfully, but these errors were encountered: