--module-source-path option implementation in javac
Eugene Zhuravlev
jeka at intellij.com
Mon Oct 24 09:11:22 UTC 2016
Thanks for the detailed answer Jonathan,
Concerning your suggestion about the "extended" or "alternate" syntax
for the module-source-path option:
> The most obvious suggestion would be to allow a command line option
and API to set an explicit package-oriented path for each module
individually. Staying clear of the naming bike-shed for now, this
could be
--new-module-source-path MODULE=PATH
e.g. --new-module-source-path
m1=/Users/Me/MyProject/src/m1 --new-module-source-path
m2=/Users/Me/MyProject/src/m2
with corresponding API
public void setLocationForModule(Location location, Name
moduleName, List<Path> paths) throws IOException
e.g.
fileManager.setLocationForModule(StandardLocations.MODULE_SOURCE_PATH,
"m1", List.of(Paths.get("/Users/Me/MyProject/src/m1")));
e.g.
fileManager.setLocationForModule(StandardLocations.MODULE_SOURCE_PATH,
"m2", List.of(Paths.get("/Users/Me/MyProject/src/m2")));
this is exactly what we need. This API suits programming tools
integrating with javac much better than the current one. It also allows
to loosen the requirement of having a directory named after a module
name, which makes project layout on disk more flexible.
Any changes to see this implemented? The API part
("setLocationForModule(Location location, Name moduleName, List<Path>
paths)") will suffice for now, but if this is supported for the command
line too, that would also be great.
--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains
http://www.jetbrains.com
The Drive to Develop
More information about the jigsaw-dev
mailing list