RFR: 7903633: Make source mode the default, and drop compiled mode

Jorn Vernee jvernee at openjdk.org
Thu Jan 18 14:20:55 UTC 2024


Make the source output mode the default, and drop the class output mode. (See JBS issue for motivation).

This is fairly straightforward. I've touched up the `Options` class a bit as well, as I noticed there were some unused elements. For the tests:
- Merged `JtregJextractSources` and `JtregJextract`. Updated generator tests to only call the merged runner
- `JextractToolRunner::run` is now responsible also for compiling generated source files. Renamed it to `runAndCompile`, and made the output directory an explicit argument, so that the util method can pick it up and compile the generated sources. Note that this method is now also responsible for checking that jextract runs successfully (which is required if we want to compile the output).
- Added a `JextractToolRunner::runNoOutput` method which just runs jextract without trying to look at the generated files (e.g. for negative tests that look for CLI errors).
- Added a `JextractToolRunner::run` method again, for the 2 tests that ran jextract with `--source`.

-------------

Commit messages:
 - move compile method to TestUtils
 - bump copyright years
 - remove jextract class mode. Make source mode the default

Changes: https://git.openjdk.org/jextract/pull/186/files
 Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=186&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903633
  Stats: 842 lines in 91 files changed: 72 ins; 565 del; 205 mod
  Patch: https://git.openjdk.org/jextract/pull/186.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/186/head:pull/186

PR: https://git.openjdk.org/jextract/pull/186


More information about the jextract-dev mailing list