uschindler commented on issue #12302:
URL: https://github.com/apache/lucene/issues/12302#issuecomment-1550830310

   Hi @rmuir,
   I agree with your proposals. #12219 looks like a first start: Making the 
implementations "pluggable" it allows users to have a custom implementation as 
separate jar file / module. This could also be a solution to add an 
implementation jar for each java version as a separate Lucene module. For 
compiling them, we can use exactly the same aproach like for MMapDirectory. Of 
course we can also include the implementation classes into the main JAR file.
   
   About the compilation:
   - yes, we can extract APIJAR stubs for the verctor API. I would use separate 
APIJAR stubs for this, especially as it is different java modules. The reason 
is how the compilation with module pathcing works in my code.
   - actually compiling might be simpler with the APIJAR stubs for incubator 
modules: They live in a private module hidden by default in the jdk. So the 
signatures are not visible unless you explicitely add the module to compiler. 
So here we can use a very simple approach: Just compile the vectorclasses 
against incubator classes without any module-patching, just add the APIJAR as a 
normal dependency. As the package names are unique there's no problem! This is 
the main reason why the APIJAR files need to be separate from the foreign ones.
   - We can use the same approach like for MMAP at runtime: Use the MR-JAR 
mechanism to separate the classes and hide them from stupid IDEs (actually the 
current approach would not need a MR-JAR at all, it is just used to "hide" the 
Java 19, 20, 21 classes from stupid IDEs). Of course user has to pass the 
`--add-module` explicitely. I'd not add the module to module-info as this would 
cause warning for ALL endusers.
   - at a later stage when the vector API goes into preview phase, we can merge 
all this with the current MMAP code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to