On 7/7/20 4:26 PM, Peter Levart wrote:
I suggest adding --enable-preview to JMH_JVM_ARGS in general now (it
doesn't hurt even if classes are not compiled with --enable-preview)
and then take time to devise an effective strategy for selectively
compiling micro benchmarks with or without --enable-preview. At least
so the benchmarks would work out-of-the-box when run via make test.
WDYT?
Or maybe this variant is acceptable?
http://cr.openjdk.java.net/~plevart/jdk-dev/8248429_jmh_enable_preview/webrev.01/
I took Jorn Vernee's patch and modified it a bit so that it does not
need to find and grep the files but I rather specify relative source
directories for EXCLUDES and INCLUDES parameters to the two separate
SetupJavaCompilation tasks respectively. Benchmarks that need preview
features (currently just one) then need to be in a package with special
prefix org.openjdk.bench.preview so they are separately compiled with
--enable-preview option. Other files are compiled without it.
Peter
Regards, Peter
On 6/30/20 10:15 PM, Claes Redestad wrote:
On 2020-06-30 22:12, Magnus Ihse Bursie wrote:
Second to that a solution in the build would be preferable - if we can
come up with something that has infinitesimal impact to build times.
Are we talking about many files? Could you consider listing those
files explicitly in the makefile? That would make it cheap to filter
them out from the normal compilation, and instead do a secondary
compilation with them.
Right now there's one micro using --enable-preview, so that'd be a very
short list.
/Claes