Skip to content

never use @embedded_jdk for --javabase #6105

Closed

Description

@cushon

--javabase currently defaults to @embedded_jdk if we can't find a local JDK (by looking at JAVA_HOME and which javac):

As discussed here this is a mistake. The embedded JDK is intended to be used as a --server_javabase and (for the time being) a --host_javabse, but when doing Java development and targeting a particular JDK version we should expect there to be a local JDK install instead of falling back to the embedded JDK.

This issue contributed to the breakages in 0.16x, because users had been relying on the embedded JDK as a --javabase when developing code that wasn't compatible with JDK 9, and were broken when the embedded JDK version was upgraded to JDK 9.

Activity

  1. added
    team-Rules-Java
    on Sep 7, 2018
  2. added
    untriaged
    team-Rules-Server
    P1
    on Sep 7, 2018
  3. added a commit that references this issue on Sep 7, 2018
    ff967f7
  4. cushon commented on Sep 10, 2018

    @cushon
    ContributorAuthor

    We should try to fix this in 0.18: #5963

  5. self-assigned this
    on Sep 10, 2018
  6. lberki commented on Sep 11, 2018

    @lberki
    Contributor

    Is there an urgency? Sure, we should fix this ASAP, but does it do harm if the change ends up in 0.19 instead?

  7. cushon commented on Sep 11, 2018

    @cushon
    ContributorAuthor

    It's a blocker for upgrading the embedded JDK version, and we need a newer JDK and javac to support building Java 11, which is being released in two weeks. I think we should try to avoid pushing Java 11 support back an additional month.

  8. lberki commented on Sep 11, 2018

    @lberki
    Contributor

    @aehlig (manager of 0.18) FYI. If I understand correctly, there will be a new baseline?

  9. removed
    untriaged
    on Sep 11, 2018
  10. buchgr commented on Sep 11, 2018

    @buchgr
    Contributor

    FYI: Since this is a incompatible change it needs to be hidden behind a --incompatible_ flag.

  11. lberki commented on Sep 11, 2018

    @lberki
    Contributor

    It is :)

  12. aehlig commented on Sep 11, 2018

    @aehlig
    Contributor

    @lberki

    If I understand correctly, there will be a new baseline?

    Yes. the new baseline is c062b1f which includes c6eef5d. So the changes so far are included; if you change anything more (like hiding the fix behind a flag), please ping the release bug explicitly, so that any needed cherry-picks can be included.

  13. cushon commented on Sep 11, 2018

    @cushon
    ContributorAuthor

    Yes. the new baseline is c062b1f which includes c6eef5d.

    Great, thanks!

    it needs to be hidden behind a --incompatible_ flag.

    It is :)

    if you change anything more (like hiding the fix behind a flag)

    I'm a little confused by this exchange: to be clear, "the fix" is c6eef5d, and it is hidden behind --incompatible_never_use_embedded_jdk_for_javabase.

    That change by itself is a no-op, the reason I'm eager to get it into a release is so we can change the default behaviour is the next release.

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

Metadata

Metadata

Assignees

Labels

P1team-Rules-Javateam-Rules-Server

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions