RFR: JDK-8196618: Create API to list supported values for javac --release option
Jan Lahoda
jan.lahoda at oracle.com
Fri Jun 8 13:51:52 UTC 2018
Hi Stuart,
Thanks for your comments! I've updated the patch according to them
(simplifying the join, cleaning up the logic in tests, removing the
tests from the list of ignored tests). The updated patch is here:
http://cr.openjdk.java.net/~jlahoda/8196618/webrev.01/
On 8.6.2018 00:53, Stuart Marks wrote:
> Hi Jan,
>
> Thanks for looking at jdeprscan. This is very timely. Michel was
> "bugging" me about some JDK 11 bugs (which are in jdeprscan) and I was
> looking at them, and I thought, I need to ask Jan about how to get the
> set of supported release values. And here we are!
>
> In jdeprscan/Main.java there's a bit of ad-hoc logic to determine
> whether a particular release is modular and whether it has the Java EE
> modules. Offhand I can't think of a better way to do this, but maybe
> this is something we can put in the back of our heads and think about a
> bit.
I agree the logic there is a ad-hoc. I was thinking of using ALL-SYSTEM,
but that would mean updating the TraverseProc, probably taking all
modules and using those whose names start with "java.", so I decided to
keep it similar to what existed before. But I can try this, if you prefer.
Thanks,
Jan
>
> For the help message, it turns out that String.join() consumes an
> Iterable, so you can probably just do something like
>
> String supportedReleases = String.join("|",
> pp.getSupportedPlatformNames());
>
> instead of creating a Stream.
>
> For jdeprscan/TestRelease.java, why not just iterate over all supported
> platform names, calling invoke() on each one? I'm not sure what the
> filtering and "minimal coverage" logic is supposed to accomplish. If
> they're not in the set of supported platforms, forcing "9" and "10"
> seems likely to create an error. And we still want to test the old,
> non-modular releases.
>
> Note further that TestRelease.java is currently on the problem list, so
> it's not getting run at the moment. I'm ok if you go ahead with those
> changes, as it doesn't matter much. I'll need to revisit this test at
> some point anyway.
>
> s'marks
>
>
> On 6/6/18 5:27 AM, Jan Lahoda wrote:
>> Hi,
>>
>> This enhancement requests that test need to be able to query the list
>> of supported --release options. This is possible using the
>> JDKPlatformProvider, so I updated two tests where this seemed useful.
>> But while doing this, it turned out the jdeprscan was not yet fully
>> updated to JDK 11 (still refers to java.se.ee and did not list 11 in
>> the help text for the --release option), so I updated that as well.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8196618
>> Webrev: http://cr.openjdk.java.net/~jlahoda/8196618/webrev.00/
>>
>> How does this look?
>>
>> Thanks,
>> Jan
>>
More information about the compiler-dev
mailing list