mocobeta edited a comment 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 work 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)
```
I think we should eventually limit the `morph` package's visibility only to
kuromoji and nori but modularizing their tests wouldn't be a trivial task; can
we work on it in a separated PR?
--
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]