davisusanibar commented on code in PR #12941:
URL: https://github.com/apache/arrow/pull/12941#discussion_r874250276
##########
java/pom.xml:
##########
@@ -777,10 +781,40 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <fork>true</fork>
+ <source>8</source>
+ <target>8</target>
+ <encoding>UTF-8</encoding>
<compilerArgs combine.children="append">
-
<arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${errorprone.javac.version}/javac-${errorprone.javac.version}.jar</arg>
+ <arg>-XDcompilePolicy=simple</arg>
+ <arg>
+ -Xplugin:ErrorProne \
+ -XepExcludedPaths:.*/(target/generated-sources)/.*
+ </arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
+
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
+
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
Review Comment:
Hi @iamzafar as per the jar artifacts are exposed as a legacy mode (it means
any jar are running in the classpath is consider as a unnamed module) and base
on JEP 200 The Modular JDK: yes, this is needed:
```
--add-opens ${module}/${package}=${target_modules}
Let the ${target_modules} access all types and members, regardless of
visibility, from ${module}'s ${package}
```
Yes, this is an intermediate step: (1) Legacy mode (already implemented, (2)
single module and (3) multi-module will be the last steps.
This is a draft for implement JPMS and be more restrict about to not give
ALL-UNNAMED access but there is a lot of discussion we need to close before to
convert this draft into PR: https://github.com/apache/arrow/pull/13072. This is
the document that I am going to send [for discussion to the
ML](https://docs.google.com/document/d/1qcJ8LPm33UICuGjRnsGBcm8dLI08MyiL8BO5JVzTutA).
--
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]