dlmarion commented on code in PR #92:
URL: https://github.com/apache/accumulo-access/pull/92#discussion_r2635625942


##########
antlr4-example/src/main/java/module-info.java:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module accumulo.access.examples.antlr {
+  exports org.apache.accumulo.access.antlr4;
+  exports org.apache.accumulo.access.grammars;
+  requires transitive accumulo.access;
+  requires transitive org.antlr.antlr4.runtime;

Review Comment:
   I cracked open the jar and I don't see a `module-info.class` file, so I 
don't think ANTLR is a Java module. However, if I don't add it then I get build 
errors like the following:
   ```
   [ERROR]   (package org.antlr.v4.runtime.atn is declared in the unnamed 
module, but module accumulo.access.examples.antlr does not read it)
   ```
   
   My understanding is that because it's a dependency of the project, the jar 
is on the module path. Because the jar is not a module by design, it becomes an 
automatic module. This is a bridge that the Java developers created to allow 
non-module jars to be used on the module path. However, we still need to add 
the dependency in our module-info file.
   
   I was reading a little at https://dev.java/learn/modules/automatic-module/, 
and I think we might need to check the poms because I think we are creating 
automatic names. 



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

Reply via email to