-
Notifications
You must be signed in to change notification settings - Fork 243
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
HSEARCH-1663 Packages not exported from osgi bundles #659
Conversation
Could you explain why Query is needing these exported? |
@@ -196,15 +196,20 @@ | |||
org.hibernate.search.annotations;version="${project.version}", | |||
org.hibernate.search.backend;version="${project.version}", | |||
org.hibernate.search.backend.spi;version="${project.version}", | |||
org.hibernate.search.backend.impl;version="${project.version}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are adding impl packages. How comes you need them? If you do, something seems fishy imo. I tried to avoid exporting impl packages intentionally in the OSGi metadata. A single case might be arguable, but these are a lot of impl classes. What exactly is the problem here? Why are they needed?
Couple more things to consider:
|
BTW good catch, as we wouldn't be able to fix the package structure if this came much later ;-) |
@Sanne I agree with you. But unfortunalely what we have now is for example [1], [2] and [3], pieces relying on internal guts of search. [1] https://github.com/infinispan/infinispan/blob/master/query/src/main/java/org/infinispan/query/indexmanager/LuceneWorkTransformationVisitor.java |
That's what we need to do. We need do determine what is really needed from the Infinispan Query side (and maybe what not) and potentially refine the api/spi. |
Seems to me these are the culprits, right?
|
So an alternative solution would be to:
@gustavonalle maybe it would help to define the requirements by using CheckStyle in Infinispan Query to make it a violation to import packages under |
@hferentschik +1, but also I notice now that some more |
Some thoughts: If we end up exposing WorkVisitor, we should look at HSEARCH-1356 again. It's just not a visitor pattern. What is this DefaultBatchBackend anyways? The docs says: "This is not meant to be used as a regular backend". So, if it should not be used, why is it used? Infinispan could also just have its own batch backend impl in this case. Why would DirectoryBasedIndexManager and InfinispanDirectoryProvider be an SPI? They are not really extension points, but rather just classes which can be used. So imo we should promote them to API. |
The plan is to hide Directory from public API or we won't ever be able to integrate nicely with remote indexing servers. Although obviously this might be needed for many integration points. +1 to promote InfinispanDirectoryProvider as API |
It's a BATCH Backend, not a regular one. It's the one used by massindexer implementors (there are several). Infinispan doesn't need to refer the the implementation, but it would need a way to construct one. We might need to introduce a factory on an SPI or a service. |
cool |
Ok, I guess we can sort out some details here. |
Closing this pull request. I guess we agree that a different approach needs to be taken and it seems we have a solution for most problematic cases. |
https://hibernate.atlassian.net/browse/HSEARCH-1663