-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Java9 Platform Module System(JPMS) #9406
base: master
Are you sure you want to change the base?
Support Java9 Platform Module System(JPMS) #9406
Conversation
d92bec6
to
055181e
Compare
8ed0ec4
to
bd25c9f
Compare
Does LanguageTool project want to provide a Java8 compatibility option for users who stick in java8 world, and don't want to go forward to future? |
41b2ac1
to
94e4640
Compare
|
This comment was marked as resolved.
This comment was marked as resolved.
Yes, I see no issue with that change. |
Partial provide of compatible classes, now work in progress. |
I've updated see b50d10d It is why |
StatusReady for review and merge. Explanation of compatibility moduleI've introduced project in When user specified the module Core class of the compatibility module
TestsMost of compatibility language classes are tested with simple test case. |
95b2431
to
5eb598e
Compare
The change here moves all the language file package, so easily conflict other changes. |
- escalate Contributor(s), TokenExpressionFactory public - move modules classes - o.l.launguage to o.l.l.(lang) - o.l.chunking to o.l.c.(lang) - o.l.synthesis to o.l.s.(lang) - Add Automatic-Module-Name manifest entry - Update imports to adjust for the above changes - resolve split package by MessagesBundle files - add automatic-module-name - languagetool-server and languagetool-tools - Update package path for o.l.l.en.English class - Improve LanguageSpecificTest - DisambiguationRuleTest respects onlyRunCode Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
5eb598e
to
cb1fb76
Compare
rebased on current master. |
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Motivation
languagetool
does not support Java Platform Module System (JPMS).The project only not support it, also break downstream applications/libraries to migrate Java 11, 17 and 21 and adopt JPMS .
It is because
languagetool
share same package among artifacts jar files, such aso.l.language
package.It is well known as
split package
problem.What issue is fixed
What changes
languagetool-core
These classes are referenced from o.l.language.(Language) classes. I move these classes packages, so referenced class should be public.
language-*
submodulesMove modules classes to resolve a
split package
problem. (see. reference for details)Gather
MessageBundles_*.properties
intolanguage-core
to resolvesplit package
problem.when languagetool project want to keep a way to split bundles to submodules, Java9 provide a new way.
There is no way to keep compatibility with both Java8 and JPMS without resolving
split package
problem by file moves.all submodules
Update imports to adjust for the
language-*
modules package changesAdd Automatic-Module-Name manifest entry
manifest property
Automatic-Module-Name
was introduced in Java 9 platform module system, to allow migration from Java8 code to JPMS without breaking Java8 compatibility. Library users who already running on >Java9 receive benefit from the configuration.Reference
A downside
Users who use LT with following style become compile error as symbol not found.
You should rewrite it as recommended way.
bad
good
Status
ready for review.
Further tasks
languagetool-org/languagetool-org.github.io#19
Other information