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

[Build] Use --release instead of --source and --target #3104

Merged
merged 2 commits into from
May 16, 2024

Conversation

vkorukanti
Copy link
Collaborator

@vkorukanti vkorukanti commented May 16, 2024

Description

Currently, we are using --target and --source to set the target JVM version, but it is known to cause issues when the jars are built using JDK17 to generate bytecode that is runnable using JVM 1.8 and above. See here for an example. Instead, use --release to generate the useable byte code in JVM 1.8 and above.

Quote from blog:

In contrast to the more widely known pair of—-source and—-target, the—-release switch will ensure that only byte code is produced that is actually usable with the specified Java version.

How was this patch tested?

  • Set JDK home to 17
  • ./build/sbt clean publishM2
  • Edit kernel/examples/run-kernel-examples.py to comment the line clear_artifact_cache().
  • Set JAVA_HOME to 1.8
  • Run Kernel integration tests: ./kernel/examples/run-kernel-examples.py --version 3.2.1-SNAPSHOT

@scottsand-db scottsand-db self-requested a review May 16, 2024 16:16
@vkorukanti vkorukanti merged commit 5bec678 into delta-io:master May 16, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants