Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 441895 - [models] uses exports dependency to lucene 3.5 prevents using 4.9 in other plugins
Summary: [models] uses exports dependency to lucene 3.5 prevents using 4.9 in other pl...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-15 18:10 EDT by Marcel Bruch CLA
Modified: 2019-07-24 14:36 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Bruch CLA 2014-08-15 18:10:47 EDT
Is actually some part of the Lucene API exported?
Comment 1 Andreas Sewe CLA 2014-08-16 07:45:36 EDT
(In reply to Marcel Bruch from comment #0)
> Is actually some part of the Lucene API exported?

Technically yes, but logically maybe not. The one part of the API that causes this uses constraint (automatically derived using "Calculate Uses" in the Manifest editor) is the following constructor:

  @VisibleForTesting
  ModelIndex(Directory index)

This is only "public" API to classes in the same package, in particular to our test fragment. If our point of view is that we disallow split packages then this is indeed a superfluous constraint.

If we remove the constraint (which makes sense, IMHO), it's just a pity that we will have to remember this exception in on future and be careful that not other, real uses of Lucene API slip beneath our radar.
Comment 2 Marcel Bruch CLA 2014-08-16 07:54:20 EDT
(In reply to Andreas Sewe from comment #1)
>   @VisibleForTesting
>   ModelIndex(Directory index)

I see.

> If we remove the constraint (which makes sense, IMHO), it's just a pity that
> we will have to remember this exception in on future and be careful that not
> other, real uses of Lucene API slip beneath our radar.

Yes. I've solution too. The only workaround I can think of ATM is to not use the lucene type as argument but Object instead. This wouldn't break much and could be acceptable (but strange, I agree)
Comment 3 Andreas Sewe CLA 2014-08-16 08:05:27 EDT
(In reply to Marcel Bruch from comment #2)
 other, real uses of Lucene API slip beneath our radar.
> 
> Yes. I've solution too. The only workaround I can think of ATM is to not use
> the lucene type as argument but Object instead. This wouldn't break much and
> could be acceptable (but strange, I agree)

Yes, that would work. As long as there's a comment that explain why there's a strange downcast, we may not end up too confused in the future. So, +1 from me.
Comment 4 Marcel Bruch CLA 2014-08-16 08:14:46 EDT
  https://git.eclipse.org/r/31789
Comment 5 Johannes Dorn CLA 2014-11-02 14:00:29 EST
Fix is merged