dweiss commented on PR #13926:
URL: https://github.com/apache/lucene/pull/13926#issuecomment-2427276085

   It is complicated also because there is some trickery in how Lucene compiles 
against those preview APIs - we don't use the preview option but instead fool 
the compiler into thinking these APIs are not in preview-mode (so that they can 
be used without the preview flag at runtime). It is definitely not something 
IDEs will easily digest.
   
   I managed to get the compilation working in IntelliJ using IntelliJ 
compilation mode, followed by manual tweaks. Sorry for lame Windows paths, but 
maybe it'll be helpful -
   
   1) add the right sources to the main21 module -
   
   
![image](https://github.com/user-attachments/assets/7b903682-120e-455a-b55d-ba9178f3571b)
   
   and redirect its output to a separate folder:
   
   
![image](https://github.com/user-attachments/assets/7baf3ac2-c5b6-4bb2-89c8-870ba7a85b5b)
   
   2) add custom compiler options to the java21 module:
   
   
![image](https://github.com/user-attachments/assets/4d63bc61-f0fa-4b74-954e-0263cd325199)
   
   rebuild and the sources in main21 will compile cleanly.
   
   
![image](https://github.com/user-attachments/assets/c9fba3ee-0ad5-4826-b44a-4ce6932f3fbf)
   
   Sadly, any time you re-import the project from gradle, this configuration 
tweak will likely be destroyed. For one-time use it may be an option though.


-- 
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