_module-specific form_ for --module-source-path from Bug # 8208609

Ross Goldberg ross.goldberg at gmail.com
Fri Aug 31 19:51:19 UTC 2018

Can someone provide some details for the _module-specific form_ enhancement
for --module-source-path from 8208609? (

Is a _file-path_ always to a file, or could it be to a directory?

If directories are supported, are all *.java file descendants compiled with
a package hierarchy rooted at the directory?

If directories aren't supported, why?  The additional error conditions
(e.g., 1 _file_path_ being a descendant of another) should be easy to
check, and allowing directories could significantly shorten command lines.

If a file is included in a module's path via a _file-path_, must the file
also be included in the standard _sourcefiles_ arguments?  If so, that
seems redundant…

Will you support {,} alternates in the _module-specific form_?  That would
also help shorten command lines.

Requiring that the module name be specified before the equals sign makes it
harder for build systems to use --module-source-path. They must either:

1. parse module-info.java: performance (must parse file), compatibility
(might require parser updates if module-info.java spec is changed)
2. read from directory structure based on convention: flexibility (limits
3. read from build config file: maintenance (config module name must align
with module-info.java module name)

Could you provide another option, possibly named --module-source, that
doesn't require the module name?

There should obviously always be one and only one module-info.java in each
module's path, so javac should be able to get the module name from that
file instead of from the command line.

Thanks for any info,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180831/b5f8fd45/attachment.html>

More information about the compiler-dev mailing list