Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

native-image --version output change in 21.1.0-dev #230

Closed
jerboaa opened this issue Mar 29, 2021 · 4 comments · Fixed by graalvm/mandrel-packaging#115
Closed

native-image --version output change in 21.1.0-dev #230

jerboaa opened this issue Mar 29, 2021 · 4 comments · Fixed by graalvm/mandrel-packaging#115
Assignees
Labels
bug Something isn't working

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented Mar 29, 2021

With Mandrel 21.0.0.0-Final this version is being reported (despite it being a bash launcher):

$ /disk/graal/builds/mandrel-java11-21.0.0.0-Final/bin/native-image --version
GraalVM Version 21.0.0.0-Final (Mandrel Distribution) (Java Version 11.0.10+9)
$ file $(readlink -f /disk/graal/builds/mandrel-java11-21.0.0.0-Final/bin/native-image)
/disk/graal/builds/mandrel-java11-21.0.0.0-Final/lib/svm/bin/native-image: Bourne-Again shell script, ASCII text executable, with very long lines

With a recent build from Graal VM master (revision 205f6ef, for example) we'd be reporting this instead:

$ ./mandrel-build/bin/native-image --version
11.0.11-ea+7 (Java Version 11.0.11-ea+7)
$ file $(readlink -f ./mandrel-build/bin/native-image)
/disk/graal/upstream-sources/graal/mandrel-build/lib/svm/bin/native-image: Bourne-Again shell script, ASCII text executable, with very long lines

This is being caused by an intentional change upstream: oracle@bcf982c See also: oracle#3313

Since --version output is being used in Quarkus we need to coordinate with them to find a scheme which will work for them and is in accordance with upstream as well.

@jerboaa jerboaa added the bug Something isn't working label Mar 29, 2021
@zakkak
Copy link
Collaborator

zakkak commented Mar 30, 2021

Also the --version output for GraalVM CE itself is going to change from:

GraalVM Version 21.0.0 (Java Version 11.0.10+8-jvmci-21.0-b06)

to

GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+5-jvmci-21.1-b02)

Note the removal of "Version" and the addition of "Java 11 CE".

I am considering submitting a PR to make the bash launcher print:

native-image 21.1.0 Java 11 CE (Java Version 11.0.11+5-jvmci-21.1-b02)

for GraalVM CE and

native-image 21.1.0.0 Java 11 Mandrel Distribution (Java Version 11.0.10+9)

for Mandrel.

The corresponding native native-image should print:

GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+5-jvmci-21.1-b02)

for GraalVM CE and

GraalVM 21.1.0.0 Java 11 Mandrel Distribution (Java Version 11.0.10+9)

for Mandrel.

WDYT?
\cc @gsmet @geoand @gastaldi @galderz @Karm

@zakkak zakkak self-assigned this Mar 30, 2021
@zakkak
Copy link
Collaborator

zakkak commented Mar 30, 2021

Some background:

native-image can be either a bash script or a binary/native executable. GraalVM CE ships native-image in its binary form and the bash script form is only used for intermediate steps while building GraalVM CE. oracle@bcf982c "breaks" the bash script's --version making it print only the JVM version.
Mandrel on the other hand ships native-image as a bash script so we need to make --version print something meaningful in the bash script form of native-image as well.

Paul Woegerer (@olpaw) commented that:

Only if you build a native-image image you will get reported GraalVM 21.1.0-dev Java 11 CE (Java Version 11.0.9+10-jvmci-21.0-b02) because that is what that image then actually is (the driver executable image produced by GraalVM 21.1.0-dev Java 11 CE). If you run the driver as an ordinary JVM application (i.e. via bash/cmd-launcher) it will now report running as such.

So to my understanding any proposals should avoid having "GraalVM" appear in the output of the bash script's --version.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Mar 31, 2021

This will have an effect on Quarkus native's version parsing. See:
quarkusio/quarkus#16131

@jerboaa
Copy link
Collaborator Author

jerboaa commented Apr 9, 2021

Fixed with oracle#3329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants