RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library [v2]
Jaikiran Pai
jpai at openjdk.org
Mon Mar 20 07:00:24 UTC 2023
On Mon, 20 Mar 2023 01:34:11 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> move @library after @modules per the recommended ordering
>
> test/jdk/java/lang/ModuleTests/AnnotationsTest.java line 61:
>
>> 59: * java.base/jdk.internal.module
>> 60: * @library /test/lib
>> 61: * @build jdk.test.lib.util.ModuleInfoWriter
>
> You don't need to build library classes explicitly. I think @library /test/lib it enough.
Hello @lmesnik, on the contrary, these build directives are recommended (and based on some of the issues we have encountered, are in fact necessary). The jtreg documentation has this to say https://openjdk.org/jtreg/tag-spec.html:
> In general, classes in library directories are not automatically compiled as part of a compilation command explicitly naming the source files containing those classes. A test that relies upon library classes should contain appropriate @build directives to ensure that the classes will be compiled. It is strongly recommended that tests do not rely on the use of implicit compilation by the Java compiler. Such an approach is generally fragile, and may lead to incomplete recompilation when a test or library code has been modified.
-------------
PR: https://git.openjdk.org/jdk/pull/13085
More information about the security-dev
mailing list