Thanks for looking at this Alan!
On 20/03/2018 3:23 AM, Alan Bateman wrote:
On 19/03/2018 05:11, David Holmes wrote:
Unsure exactly who should review this ...
bug: https://bugs.openjdk.java.net/browse/JDK-8199768
webrev: http://cr.openjdk.java.net/~dholmes/8199768/webrev/
CompilerUtils.compile compiles all source files in a given directory
tree into a specific directory. This is done by passing
Integer.MAX_VALUE as the 'depth' argument to Files.find.
There are times when we** don't want to compile the entire tree into a
single directory so it would be useful to be able to specify whether
or not to recurse (depth = Integer.MAX_VALUE) or not (depth = 1).
** I need this for some tests I'm developing for Nestmates (JEP 181)
and it will be simpler to fix this separately in mainline.
Looks okay although an alternative is to just invoke the existing method
with the specify source files that you want to compile (which I think
what is what several tests do when they have only one or two source
files to compile).
Based on the description I hadn't realized the Path could actually just
be a single file. But I think my change makes it easier to compile
things without needing to enumerate all the source files. You can now
compile 1 file, 1 directory, or 1 directory tree.
Thanks,
David
-Alan