-
Notifications
You must be signed in to change notification settings - Fork 146
Depend on Lucene using the Import-Package header #2137
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
Depend on Lucene using the Import-Package header #2137
Conversation
For context: We maintain three releases of our application, the oldest one based on the Eclipse 2023-12. Because of CVE-2024-45772, we need to update to a newer Lucene version. But because the Help plugin expects a specific bundle name, this became slightly more frustrating. |
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
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.
It's a better design.
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.
Looks resonable
ad86e50
to
d4cd7f0
Compare
I've udated the PR to handle the failing test cases. Following import needed to be added as well: Which raises a potential problem I'm not sure how to handle. Users can contribute their own analyzers using the Or to rephrase: Using |
That seems reasonable and I don't see an immediate problem here?
Can you explain this more especially how require-bundle makes the situation better? We then maybe will find a solution out here. Maybe But I'm not completely sure why the imports are needed for a custom Analyzer, should not the custom one then make sure all packages are properly imported? |
Assume someone contributes the following analyzer:
Because the
You wouldn't have this issue when using
The problem is that the classloader for |
This sounds strange as it would mean that the user of the extension point would need to import all requirements what should not be the case, so it it ensured that the provider has a proper import package or was it just omitted because it "worked anyways"? I'm asking because the code in question explicitly says it loads the class from the contributing bundle: RegistryStrategyOSGI.java
|
@ptziegler I now found that the extensions are directly provided by the In this case I would recommend to use the |
Yes, you are correct. I got misled by the stacktrace. I've extended the UA test with the Tamil analyzer, which is also where I contributed to the extension point. After I added the additional package to the test bundle, the stack trace went away. So that is indeed a non-issue. |
c24cd8b
to
a485621
Compare
Done |
5931d7c
to
53a9748
Compare
Using the Import-Header entries allows consumers to contribute their own Lucene bundles, without having to match the symbolic name defined by Orbit.
e9de4a9
to
06be955
Compare
Merging, as the only issue seems to be my misunderstanding of which classes are loaded by which classloader. |
Using the Import-Header entries allows consumers to contribute their own Lucene bundles, without having to match the symbolic name defined by Orbit.