RFE simplify usage of patched module [by Robert Scholte, from jdk-dev]
Christian Stein
sormuras at gmail.com
Wed Feb 19 11:46:38 UTC 2020
On Tue, Feb 18, 2020 at 6:42 PM Alex Buckley <alex.buckley at oracle.com>
wrote:
>
> Good description of how the main module
> [...]
> etc. Then, the build tool can enrich the main module by passing
> --add-modules, --add-reads, and --add-opens to javac/java while in a
> test scope. No need for --patch-module-descriptor in the JDK.
>
>
But, as Robert already noted, each build tool will come up with
a different notation for their users to configure those additional
elements. That's nothing wrong with it per se -- just that there's
already a common notation for providing modular information:
"module-info.java"
And it's hard to explain why users may write "module-info.java"
files for inter-module testing that build pass 1:1 to javac and
friends -- have to either, depending on the tool, supply:
- command-line flags... [Maven]
- or a module-info.test file... [Gradle via Plugin]
- or module-info.java file... [Pro, Bach.java]
- or some-other-module-layer-magic configuration...
only for in-module testing.
javac and friends are the "best" choices to combine and
unify those superpowers. Only the user-facing notation
needs some love.
Cheers,
Christian
More information about the jigsaw-dev
mailing list