RFC: add starred module(s)
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Feb 7 16:21:14 UTC 2018
Max,
This would be a big change for jtreg.
The use of library classes has grown significantly over the past couple
of years, which is not a bad thing in and of itself, but it does lead to
questions about the design of such libraries, and the compatibility
concerns for updating such libraries. Making an edit to ProcessTools
such that all tests have to be edited might indicate a poor design for
ProcessTools. Indeed, we went through such an issue with the langtools
"toolbox" library, in which we split the library (a single class with
nested classes) into a package of classes, so that additional
functionality could be added as needed, in new classes, without
affecting existing uses.
-- Jon
On 2/6/18 5:51 AM, 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