uschindler commented on pull request #572:
URL: https://github.com/apache/lucene/pull/572#issuecomment-1001719710


   > bq. If I remove the requires directive completey, it fails. So it looks 
like the following is happening: the ALL-MODULE-PATH makes it visible to the 
module layer. Because it is visible there, the JDK adds it and the optional 
dependency gets resolved and satisfied. But I am just guessing.
   > 
   > Hmm... but isn't requires static going to include the module, if it's 
available in the module graph (even if it's not explicitly added)? If you 
remove it completely - it fails and this seems to be fine. If you add it as a 
requires static, it should be included because it is available in the pool of 
modules. I think it works as intended?
   
   No exactly: The JDK always contains the module, but if nothing else is not 
using the module it won't be added to module graph. You can try this with a 
plain luke: When you start Luke with current patch it logs the warning - as 
expected because I did not add `--add-module jdk.unsupported` willingly (and I 
won't - we have a warning printed and Luke does not need MMAP):
   
   
![image](https://user-images.githubusercontent.com/1005388/147503086-bbd533bd-ce2e-42d1-ac7f-bd64e473d77d.png)
   
   So it looks like the `--add-modules ALL` adds it to module graph explicitly.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to