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

[build] Support JDK-21 (#9672) #9714

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

jonpryor
Copy link
Member

Context: #9651

PR #9651 demonstrated that it was fairly straightforward to use JDK-21 on CI. We don't want to fully bump to JDK-21, because we still support building with JDK-17, so we at minimum need to run tests on both JDK-17 and JDK-21.

As a "minimal introductory step", add support for JDK-21:

  • Update to Gradle 8.12, for harmony with dotnet/java-interop.

  • Update the <Javac/> task to use javac --release N when using JDK-17 and later. JDK-11 doesn't support javac --release. (Why care about JDK-11? Because .NET 8 still supports it, and this will make future cherry-picking easier.)

  • Set $(LatestSupportedJavaVersion)=21.0.99, which removes the XA0030 error which would result from using JDK-21.

Context: #9651

PR #9651 demonstrated that it was fairly straightforward to use
JDK-21 on CI.  We don't want to fully bump to JDK-21, because we
still support building with JDK-17, so we *at minimum* need to run
tests on both JDK-17 and JDK-21.

As a "minimal introductory step", add support for JDK-21:

  * Update to Gradle 8.12, for harmony with dotnet/java-interop.

  * Update the `<Javac/>` task to use `javac --release N` when using
    JDK-17 and later.  JDK-11 doesn't support `javac --release`.
    (Why care about JDK-11?  Because .NET 8 still supports it, and
    this will make future cherry-picking easier.)

  * Set `$(LatestSupportedJavaVersion)`=21.0.99, which removes the
    XA0030 error which would result from using JDK-21.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember this test failing on .NET 8 release branches:

image

The test is removed in main, .NET 9, etc. I think it's fine to ignore.

@jonpryor
Copy link
Member Author

Elaborating on what @jonathanpeppers wrote, if we compare the following:

a8cd27e4 has failures with:

  • CustomDesignerTargetSetupDependenciesForDesigner
  • TestResolveToolsExists
  • ApplicationRunsWithDebuggerAndBreaks(True,"Assemblies",False,null,"apk",False)

The test results for this PR has those same failures.

I thus deem this an "acceptable" pass, and will merge.

@jonpryor jonpryor merged commit cdb777a into release/8.0.4xx Jan 28, 2025
42 of 46 checks passed
@jonpryor jonpryor deleted the dev/jonp/jonp-cp-JDK-21-net8 branch January 28, 2025 19:28
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants