Skip to content
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

Make LEMMA compatible with the Java Platform Module System #53

Open
frademacher opened this issue Mar 2, 2022 · 1 comment
Open

Make LEMMA compatible with the Java Platform Module System #53

frademacher opened this issue Mar 2, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@frademacher
Copy link
Collaborator

When executing a LEMMA model processor we currently get warnings like

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by nonapi.io.github.classgraph.classpath.CallStackReader (file:/home/florian/Dokumente/Forschung/Dissertation/eclipse-workspace/code%20generators/de.fhdo.lemma.model_processing.code_generation.java_base/build/libs/de.fhdo.lemma.model_processing.code_generation.java_base-0.8.5-SNAPSHOT-standalone.jar) to method java.lang.SecurityManager.getClassContext()
WARNING: Please consider reporting this to the maintainers of nonapi.io.github.classgraph.classpath.CallStackReader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

This is due to the Java Platform Module System (JPMS), which since Java 9 checks for not explicitly allowed accesses between classpath dependencies (cf. https://www.baeldung.com/java-9-modularity for a more technical explanation). To prevent such warnings (which in future Java releases will be handled more strictly), we would need to convert LEMMA to be compatible with JPMS (in fact, the above warning is from the ClassGraph library with LEMMA's model processing framework scans the classpath for annotations).

Unfortunately, Xtext currently seems to prevent us from porting LEMMA to JPMS given its org.eclipse.xtext and the transitive org.eclipse.xtext.util dependency both define the split package "org.eclipse.xtext.util". As it seems, JPMS however prevents split package accesses. See detailed example of the problem here: https://github.com/frademacher/xtext-jpms-test (with an elaborate explanation here: https://github.com/frademacher/xtext-jpms-test/blob/main/build.gradle.kts). Thus, we probably need to wait until Xtext is made JPMS-enabled upstream.

@frademacher frademacher added enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2022
@frademacher
Copy link
Collaborator Author

As soon as LEMMA is compatible with JPMS, this commit should be reviewed and (maybe partially) reverted: 20e6be9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant