One possible solution could be to introduce the use of a new file `LIBRARY.properties` (by analogy with `TEST.properties`) to provide an open-ended mechanism for providing jtreg with any necessary attributes about the library -- including whether it needs to be compiled with `--enable-preview`.
The file would be placed in the directory specified in an `@library` tag, and read when `jtreg` compiles any classes in that library. See `BuildAction.compileLibrary`.
Putting information like this with the library itself eliminates any churn in the tests that use the library, both when using preview features, and subsequently, when the features eventually become standard.
- relates to
-
CODETOOLS-7903882 LIBRARY.properties control of compilation options
-
- In Progress
-
-
CODETOOLS-7903790 Use source instead of release option for library compilation
-
- Resolved
-
-
CODETOOLS-7903808 IOOBE in compile action when processing class files only
-
- Resolved
-
-
CODETOOLS-7903809 Invalid source release N with --enable-preview
-
- Resolved
-
-
JDK-8336108 [lworld] Test libraries compiled with --enable-preview are causing tests failures
-
- Closed
-
-
CODETOOLS-7903940 Remove problematic `LIBRARY.properties` implementation
-
- Resolved
-
-
JDK-8337048 [lworld] ProblemList BasicLayerTest until jtreg LIBRARY.properties is supported
-
- Resolved
-
- links to
-
Commit(master) openjdk/jtreg/e9bb12e4
-
Review(master) openjdk/jtreg/212