RFR: 7903187: jextract should support --version option
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri May 13 14:46:09 UTC 2022
On Fri, 13 May 2022 14:27:28 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
> added --version option that prints the underlying Java version and exits.
src/main/java/org/openjdk/jextract/JextractTool.java line 356:
> 354:
> 355: if (optionSet.has("--version")) {
> 356: err.println(System.getProperty("java.version"));
looking at other tools such as `javac` and `javadoc` they print out the tool name and then the version - e.g. `javac 15`. We should at least be consistent with that.
Then there `jtreg` which prints out a lot more info:
jtreg 6.2+1-12
Installed in /opt/jtreg/lib/jtreg.jar
Running on platform version 11.0.15 from /usr/lib/jvm/java-11-openjdk-amd64.
Built with Java(TM) 2 SDK, Version 1.8.0_261-b33 on January 22, 2022.
Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
JT Harness, version 6.0 ea b14 (November 04, 2020)
Java Assembler Tools, version 7.0 ea b09 (June 04, 2020)
TestNG (testng.jar): version 7.3.0
TestNG (jcommander.jar): version unknown
TestNG (guice.jar): version 4.2.3
JUnit (junit.jar): version 4.13.2
JUnit (hamcrest.jar): version 2.2
While we don't to replicate what jtreg does 100%, a couple of comments:
* adding the specific version with which jextract was built could not be a bad idea (for debugging)
* adding at least the LLVM version used could also be good
-------------
PR: https://git.openjdk.java.net/jextract/pull/31
More information about the jextract-dev
mailing list