Skip to content
New issue

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

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

Already on GitHub? # to your account

Rebuilding against a more precise JDK versions #1718

Open
marko-bekhta opened this issue Feb 21, 2025 · 4 comments
Open

Rebuilding against a more precise JDK versions #1718

marko-bekhta opened this issue Feb 21, 2025 · 4 comments
Labels
enhancement New feature or request for builspec/rebuild.sh help wanted Extra attention is needed

Comments

@marko-bekhta
Copy link
Contributor

I recently was trying to run the rebuild script check on a project released with JDK 17.0.12 while the rebuild script uses 17.0.14. I've ended up with:

-        throw new UnsupportedOperationException("UserType does not support reading CallableStatement parameter values: " + this.userType);
+        throw new UnsupportedOperationException("UserType does not support reading CallableStatement parameter values: " + String.valueOf((Object)this.userType));

so I was thinking, should there be a way to specify the JDK version more percise.

An implementation idea for this: for a project that has a maven/gradle wrapper we could leverage the simple JDK image instead of using maven/gradle ones, e.g. eclipse-temurin:17.0.14_7-jdk-alpine (or whatever is specified) This way we could lock the rebuilt to the exact JDK version.

@algomaster99
Copy link
Contributor

There is support for building project with a precise JDK version. See

for example.

When you rebuild this buildspec, it would spawn an interactive subshell and then you can switch to JDK 17.0.12 and then run the maven command provided.

@marko-bekhta
Copy link
Contributor Author

@algomaster99 thanks for the suggestion. But I don't think it plays nicely with the gradle rebuild, see:

jdkImage="docker.io/library/gradle:8-jdk${jdk}"

it uses the gradle images, and those do not have such granularity for JDK versions. So if a more precise version is specified ...

manifest for gradle:8-jdk17.0.12 not found

@algomaster99
Copy link
Contributor

Uh okay. I am not sure about gradle rebuilds. I have not played with them as much 😅

@hboutemy hboutemy changed the title Rebuilding against a more percise JDK versions Rebuilding against a more precise JDK versions Feb 28, 2025
@hboutemy
Copy link
Member

hboutemy commented Feb 28, 2025

yes, generated bytecode changed quite much in JDK 17.0.14: there is a clear split between "up to 17.0.13" and 17.0.14 (I hope 17.0.15 will generated like 17.0.14...)
in the past, this happened with JDK 8: there is same split in time, I just did not record the ranges.
The clearly known JDK difference is Azul Zulu JDK 8 vs any other vendor, as they back-ported hash algorithms from JDK 11 and it had an impact on CycloneDX Maven Plugin.

this is exceptional, hence why Reproducible Central intentionally did not record patch JDK requirements: this was a design decision I did from the start.
I added an option for Azul, as a way to support the Zulu 8 case: it did not break the design, just added a small "vendor prerequisite"

if you have an idea on how to configure in .buildspec and add related support in ./rebuild.sh without breaking the design, help welcome

@hboutemy hboutemy added enhancement New feature or request for builspec/rebuild.sh help wanted Extra attention is needed labels Feb 28, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request for builspec/rebuild.sh help wanted Extra attention is needed
Development

No branches or pull requests

3 participants