You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the java.toolchain specification is changed by adding/removing/changing the implementation, this change is ignored and the previously configured toolchain will be used.
This problem is presumably because the download file name does not encode this information.
Note that a similar issue occurs with Gradle 7.4 nightly, when changing the vendor from ADOPTIUM to IBM_SEMERU.
Expected Behavior
The specified toolchain should be downloaded, provisioned and used.
This happens as it does because the implementation name is not included in the filename of the JDK/JRE archive downloaded by our auto-provisioning mechanism. For J9 you get a corrupted archive, which is downloaded successfully but fails to be unarchived. When you remove the J9 implementation criteria from the toolchain spec you would expect a fresh archive to be downloaded, but it doesn't. The old, corrupted one is there and is still matched as what you want.
To clarify, I downloaded 2 different JDK 17 implementations (openJ9 and hotspot) and they both have a root directory named jdk-17.0.1+12. This means that even if we give the downloaded archives different names, the first one extracted will always win. You should be able to confirm this by changing the implementation type and looking for this log message
When the
java.toolchain
specification is changed by adding/removing/changing theimplementation
, this change is ignored and the previously configured toolchain will be used.This problem is presumably because the download file name does not encode this information.
Note that a similar issue occurs with Gradle 7.4 nightly, when changing the
vendor
fromADOPTIUM
toIBM_SEMERU
.Expected Behavior
The specified toolchain should be downloaded, provisioned and used.
Current Behavior
The change to toolchain spec is ignored.
Steps to Reproduce
main
branch of https://github.com/bigdaz/gradle-toolchain-issues./gradlew -g HOME build
: the build should fail as described in Error extracting downloaded toolchain forJvmImplementation.J9
#19382build.gradle
file to comment out theimplementation
set on the Java toolchain spec../gradlew -g HOME build
again : the same error will occur.rm -rf HOME
to start with a clean Gradle User Home./gradlew -g HOME build
again : this time the toolchain is successfully extracted.The text was updated successfully, but these errors were encountered: