RFC: add starred module(s)
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Feb 7 16:37:44 UTC 2018
On 2/7/18 2:36 AM, Jiri Vanek wrote:
> On 02/07/2018 06:38 AM, Weijun Wang wrote:
>>
>>
>>> On Feb 7, 2018, at 9:51 AM, Felix Yang <felix.yang at oracle.com> wrote:
>>>
>>> Hi Max,
>>>
>>> I have another idea, how about make the test libs into JPMS
>>> modules. Then the dependencies will be explicitly described at where
>>> it happens. Any comment?
>>
>> Your proposed change seems too big to me, and I'm not sure how to do
>> it, and the size of a module, etc.
>>
>
> This would be hardly compatible with older jdk, wouldnt it?
For OpenJDK, the tests are associated with the JDK repo, and so we could
use modules for library code that is specific to a version of JDK. I
agree that for modules could not be used for any libraries for
additional tests that need to run on older versions of JDK.
-- Jon
>
>> --Max
>>
>>>
>>> -Felix
>>> On 2018/2/6 21:51, Weijun Wang wrote:
>>>> While I am not requesting for an automatic discovery of @module
>>>> tags, I wonder if we can enhance jtreg from another angle to make
>>>> test writing a little easier.
>>>>
>>>> The "@modules java.security.jgss/sun.security.krb5.*" example is
>>>> painful because these --add-exports are not required by the tests
>>>> themselves. Instead, it's a library class (KDC.java in the same
>>>> directory) they are using that is accessing these internal classes.
>>>> This explains why the @module tags appear in multiple tests but you
>>>> won't see any of these tests importing a class in those packages.
>>>>
>>>> Think of this extreme example, suppose someone adds a reference to
>>>> an internal class in ProcessTools.java, then suddenly all tests
>>>> using it require a new @module tag.
>>>>
>>>> So, is it possible to add the @module tags to that library class?
>>>>
>>>> /*
>>>> * @library
>>>> * @module ....
>>>> */
>>>>
>>>> Thanks
>>>> Max
>>>>
>>>
>>
>
>
More information about the jtreg-dev
mailing list