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