per-module module-source-path for javac

Nikolay Chashnikov nikolay.chashnikov at jetbrains.com
Fri Dec 16 13:05:51 UTC 2016


Any comments?

On Mon, Dec 12, 2016 at 8:29 PM, Nikolay Chashnikov <
nikolay.chashnikov at jetbrains.com> wrote:

> Hello,
>
> we're actively working on support for Jigsaw in IntelliJ IDEA. Some time
> ago we asked (see this post
> <http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-October/009713.html>)
> about restrictions in --module-source-path parameter of javac command line.
> It appears that currently javac has rather strict requirements regarding
> layout of the source files of multi-module projects on the disk: module
> sources must be located under a directory which name is equal to the
> (qualified) module name, and locations of source directories for different
> modules must follow some common scheme. It's ok for new projects, but it
> complicates migration of existing projects to Jigsaw: you not only need to
> create module-info.java files, get rid of split packages, etc, but also
> most probably you'll need to rearrange directories containing the sources.
> For me, the latter looks like an unnecessary complication, it may make
> migration to Jigsaw more difficult, especially for big projects developed
> by large teams. I think it would be great to allow users to specify
> module-source-path for each module individually.
>
> Given that the implementation (com.sun.tools.javac.file.Locations.
> ModuleSourcePathLocationHandler) already stores paths for different
> modules separately, it seems to be rather easy to expose ability to specify
> module-source-path on per-module basis to StandardJavaFileManager's API.
> The change in API suggested by Jonathan Gibbons (see this post
> <http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-October/009781.html>)
> looks good, it will allow us to support arbitrary layout of sources in
> IntelliJ IDEA. Do you plan to implement it? How can we help you with that?
>
> --
> Nikolay Chashnikov
> Team Lead
> JetBrains
> http://www.jetbrains.com
> The Drive to Develop
>



-- 
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
The Drive to Develop


More information about the jigsaw-dev mailing list