RFR [XS]: 8248429: Add --enable-preview as VM argument when running microbenchmarks
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Jun 30 20:12:48 UTC 2020
On 2020-06-30 19:32, Claes Redestad wrote:
>
> On 2020-06-30 18:40, Magnus Ihse Bursie wrote:
>>>
>>> An alternative workaround would be to add
>>> @Fork(jvmArgsAppend = "--enable-preview") to all micros, whether
>>> they use preview features or not. Perhaps that wouldn't be so bad,
>>> actually.
>> That sounds like a reasonable compromise, yes.
>
> Well, it moves the responsibility to micro authors, while violating the
> principle of least surprise in some ways.
>
> I think my preference would be some means to ask javac to not tag
> .class files with the 65535 minor version unless there's some actual
> preview feature usage (which I think is what the --enable-preview flag
> should do by default, but I guess someone has insisted on the current
> behavior to get more of a fail fast behavior).
>
> 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.
/Magnus
>
> Adding --enable-preview to every micro would be a reasonable workaround,
> for now, but I view it as a temporary hack.
>
> /Claes
More information about the build-dev
mailing list