[
https://issues.apache.org/jira/browse/GROOVY-9273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18145865#comment-18145865
]
ASF GitHub Bot commented on GROOVY-9273:
----------------------------------------
blackdrag commented on PR #3235:
URL: https://github.com/apache/groovy/pull/3235#issuecomment-6925827749
@daniellansun Instead of giving a detail review I think we need first to
talk about the basic problem I see in this PR
I think two aspects of the current implementation need reconsideration:
1. `ModuleInfoNode` is a first-class language construct, but it is currently
attached to a synthetic `ClassNode` through node metadata. You say "The module
declaration is not a class (JLS ยง7.3, ยง7.7), and the per-class pipeline is what
we needed to reuse. " But this makes the module declaration look like auxiliary
information about a class, which it isn't. It also introduces an artificial
dependency on the class-node representation and risks the declaration being
lost or mishandled by compiler transformations. The module declaration should
be represented explicitly in the compilation-unit model, rather than relying on
class metadata as its primary representation. At least if this is supposed to
be a "clean" solution. Of course I see how this is a much bigger change in
total.
2. `CompileUnit` should not need to know which class files were produced by
an external Java compiler. This information should remain within the
joint-compilation implementation or be exposed through an appropriate
compilation context.
There are potentially more issues, but changes to these two would complete
change the PR I assume.
> Support module descriptor, aka. module-info
> -------------------------------------------
>
> Key: GROOVY-9273
> URL: https://issues.apache.org/jira/browse/GROOVY-9273
> Project: Groovy
> Issue Type: New Feature
> Reporter: Daniel Sun
> Priority: Major
>
> ย
> [https://openjdk.java.net/projects/jigsaw/quick-start]
> [http://tutorials.jenkov.com/java/modules.html#java-module-basics]
> [https://www.oracle.com/corporate/features/understanding-java-9-modules.html]
> [https://www.concretepage.com/java/java-9/java-module]
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)