mocobeta commented on pull request #740:
URL: https://github.com/apache/lucene/pull/740#issuecomment-1072400574


   > For now, I saw compilation fails with warning when I add to clause to 
exports.
   
   I temporarily suppressed this warning by `@SuppressWarnings("module")`, then 
the whole project passed compilation with this `to` clause.
   ```
   exports org.apache.lucene.analysis.morph to 
org.apache.lucene.analysis.kuromoji, org.apache.lucene.analysis.nori;
   ```
   
   While the built kuromoji and nori jars works fine, I found an interesting 
issue. It seems we also have to modularize tests of kuromoji / nori (currently, 
the tests are "unnamed" module so `org.apache.lucene.analysis.morph` package is 
not visible to them).
   ```
   ./gradlew -p lucene/analysis/kuromoji/ compileJava --rerun-tasks
   BUILD SUCCESSFUL in 10s
   ```
   ```
   ./gradlew -p lucene/analysis/kuromoji/ test
   
   > Task :lucene:analysis:kuromoji:compileTestJava FAILED
   
/mnt/hdd/repo/lucene/lucene/analysis/kuromoji/src/test/org/apache/lucene/analysis/ja/dict/TestExternalDictionary.java:20:
 error: package org.apache.lucene.analysis.morph is not visible
   import static 
org.apache.lucene.analysis.morph.BinaryDictionary.DICT_FILENAME_SUFFIX;
                                           ^
     (package org.apache.lucene.analysis.morph is declared in module 
org.apache.lucene.analysis.common, which does not export it to the unnamed 
module)
   
   ```


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