Skip to content

Add support for JDK 22 #180

Closed as not planned
Closed as not planned

Description

@davido

JDK 22 release is available since 19th March 2024.

Activity

  1. hvadehra commented on May 8, 2024

    @hvadehra
    Member

    While we have added STS java releases in the past, we've also been dropping them, keeping only the LTS ones around. This probably ends up creating too much churn, and unnecessary breakage on updating rules_java.

    I think it's somewhat trivial for users of rules_java to declare the repository(ies) themselves using remote_java_repository.

    @davido Is there any added benefit to the declarations living in rules_java?

  2. added
    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
    on May 8, 2024
  3. sluongng commented on Oct 2, 2026

    @sluongng

    @hvadehra tbh now that it's 2026 with the advent of coding agents, I don't think the churn is that high. I am working with a lot of enterprise Bazel users who prefer to keep their dependencies as close to HEAD as possible to benefit from security fixes as well as performance improvements. This ranges from the kernel version to glibc, clang, as well as JDK.

    Adding support for JDK 27 into rules_java would let these users enable this via the existing flags instead of having to maintain the custom toolchains themselves. Accumulatively, it should reduce churn for the entire ecosystem, not the other way around.

    So I strongly urge the team to reconsider this.

    cc: @meisterT

  4. hvadehra commented on Oct 2, 2026

    @hvadehra
    Member

    instead of having to maintain the custom toolchains

    could also be met with

    it's 2026 with the advent of coding agents

    /scnr


    I could see the argument for having this in rules_java with WORKSPACE a few years ago. Today if you wish to avoid duplication, a sluongng_java_toolchains1 BCR module seems simple enough?

    Footnotes

    1. now that we have bzlmod, the java toolchain definitions should maybe be moved out into a separate module anyways ↩

  5. sluongng commented on Oct 2, 2026

    @sluongng

    This is actually what is already happening today, with a lot of <user|org>_rules_java_fork being maintained internally in each org. I do think there is value in deduplicating these efforts in a centralized place, though.

  6. meisterT commented on Oct 5, 2026

    @meisterT
    Member

    Do I understand correctly that the best course of action would be to to move toolchain declarations out of rules_java into an official rules_java_toolchains module? How much work is that?

  7. hvadehra commented on Oct 5, 2026

    @hvadehra
    Member

    Do I understand correctly that the best course of action would be to to move toolchain declarations out of rules_java into an official rules_java_toolchains module? How much work is that?

    A community maintained module (perhaps under bazel-contrib) is what I'm envisaging. But it's possible I'm missing the downsides of small, composable modules rather than monolithic ones?

  8. davido commented on Oct 5, 2026

    @davido
    ContributorAuthor

    A community maintained module (perhaps under bazel-contrib) is what I'm envisaging.

    I put together a rules_java_toolchains Bazel module and consumed it in Gerrit.

    Happy to move it under bazel-contrib and publish to the BCR if that's the direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions