RFR: 8035063: Option handling in sjavac needs to be rewritten
andreas.lundblad at oracle.com
Wed Mar 19 13:32:09 UTC 2014
On Wed, Mar 19, 2014 at 01:58:21PM +0100, Fredrik Öhrström wrote:
> The code by itself looks good. However I think that changing from . to / is
> a really bad idea.
> If someone committed a package directory that does not map correctly to the
> package name, then that is a major problem. You will not find that source
> through -sourcepath, which means that you just broke sjavac ability to
> compile using multiple threads. This is just as bad as when Nashorn tried
> to insert $ into java source file names! The horror, the horror.
> I.e. do not replace . with /. Fix the problem in the jdk.
In this case, the directory did not contain any source files, just a bunch of resources for documentation, such as .gif-files. (How could it contain source files? A package may not contain a '-'.) So unless I misunderstood you, there should therefore be no problem in this case.
I would prefer to see -i and -x as filters on what directories (not packages) exists in the subsequent source root: This is more in line with other options (-if, -xf, -src, ...) which all talk about paths and more general since each package corresponds to a directory, but only some directories correspond to packages.
More information about the compiler-dev