-
Notifications
You must be signed in to change notification settings - Fork 251
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
typetools optionality? #94
Comments
Hi Yurii, As far as I know, TypeTools itself fails gracefully (returns type UNKNOWN to CQEngine) if sun.* classes are not available. And AFAIK CQEngine currently handles this condition. My plan with CQEngine's QueryFactory was to isolate the methods which require this functionality from the ones which don't. So applications which want to have CQEngine auto-detect the types can call the corresponding methods, and applications which want to avoid the auto-detection and provide the types explicitly can do so. So I don't think there currently is a hard requirement on the availability of sun.* classes. What happens in an OSGi container if you disable access to those methods? From CQEngine's perspective this should be fine. Or, is the problem with the manifest of the upstream TypeTools project? |
The problem with OSGi is that the dependency on sun.reflect is declared as This can be addressed in TypeTools manifest, too. I was just thinking to
|
My intent was that while CQEngine would have a hard dependency on TypeTools, TypeTools would have that soft dependency on sun.* classes. And AFAIK this is the case in terms of how the code works. Does it make more sense to fix this (OSGi manifest problem?) upstream in TypeTools, rather than in CQEngine? Is an optional dependency in OSGi the same as an optional dependency in Maven? My preference would be for all features to be available by default, but of course to support users who want to exclude certain features/dependencies (via extra config in their project) if they need to.
|
The reason why I thought of addressing it in cqenine is that it seemed to
|
I'm not sure how to solve this. What do you suggest? If I mark the TypeTools dependency (or the sun.* dependency) as optional in CQEngine's OSGi manifest, does that mean that it will be included by default or excluded by default? |
If If a maven dependency is declared as optional (https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html) then those who DO use this functionally will have to declare this dependency manually. If we follow your intuition and instead convince @jhalterman to mark |
Hi Yurii, have you had any more thoughts on this? |
Closing this. Feel free to reopen if necessary. |
Would it be possible to make typetools dependency optional (at least for OSGi manifest's purpose), as it requires
sun.reflect
and while it is possible to configure an OSGi container to expose more of private packages, it's definitely not clean, considering that (in my case) I am not using this functionality as I am relying on a simpler solution.The text was updated successfully, but these errors were encountered: