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

Gradle javaToolChains - output is misleading #16140

Closed
swpalmer opened this issue Feb 12, 2021 · 2 comments · Fixed by #20814
Closed

Gradle javaToolChains - output is misleading #16140

swpalmer opened this issue Feb 12, 2021 · 2 comments · Fixed by #20814
Assignees
Labels
a:bug in:toolchains Java Toolchains
Milestone

Comments

@swpalmer
Copy link

Expected Behavior

Running gradle javaToolChains should show information about installed JDKs with details that will assist in choosing the parameters to select one in the build.gradle file.

Current Behavior

The vender information is transformed and not matching the value of the java.vendor system property.

Context

I tried to use the vender string printed by the output of gradle javatoolChains to match for toolchain selection. In my case gradle printed 'Zulu' as the vendor, but the JDK java.vendor string was actual 'Azul Systems, Inc.'
'Zulu' is the product name, not the vendor name.

Steps to Reproduce

Install JDKs from several vendors. Run gradle javaToolChains compare the vendor shown in the output to the actual vendor from the java.vendor system property.
There is no reason for these to be different!
Strings that can be used for matching with vendor = JvmVendorSpec.matching("customString") should be shown.

Your Environment

Windows 10 Pro
Gradle 6.8.1
Zulu-8
Zulu-15

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@h0tk3y
Copy link
Member

h0tk3y commented May 17, 2022

@swpalmer Thanks for reporting this! We've discussed the issue and decided that, indeed, displaying the Azul JDK vendor as Zulu was misleading, mostly in the sense that it didnt't help to choose the built-in JvmVendorSpec.AZUL.

Note that the recommended way to choose a toolchain that is provided by a vendor known to Gradle is to use the static members of JvmVendorSpec, like JvmVendorSpec.AZUL. Those built-in vendor specs can match JDK installations from a particular vendor that might have different java.vendor names across versions.

We decided that It should be fine for the known vendors not to be listed with the exact java.vendor values as long as the reported names help with choosing one of the JvmVendorSpec.* members.

The fix changes the display name for the Azul-provided JDKs to Azul Zulu, which matches the JvmVendorSpec item and follows the pattern "vendor-company product-name" which some other display names also use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug in:toolchains Java Toolchains
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants