Skip to content

Conversation

@claui
Copy link
Contributor

@claui claui commented Apr 19, 2019

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example. No new automated tests but tested all branches manually
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally? There were several errors but unrelated to the PR at hand.

Homebrew picks up any Java it finds on the user’s system. That’s a good thing; users should remain free to install any Java they see fit.

This PR changes the message that appears when Homebrew detects that a Java requirement is unmet.

The new message will say:

Install AdoptOpenJDK with Homebrew Cask:
  brew cask install adoptopenjdk

And for Java 8:

Install AdoptOpenJDK 8 with Homebrew Cask:
  brew cask install homebrew/cask-versions/adoptopenjdk8

Note that Homebrew’s build servers will now use AdoptOpenJDK to test formulas that depend on Java.

This PR supersedes #6035; see that for more details.

Fixes Homebrew/homebrew-core#39037

This commit changes the message that appears when Homebrew detects
that a Java requirement is unmet.

The new message will say:

```
Install AdoptOpenJDK with Homebrew Cask:
  brew cask install adoptopenjdk
```

And for Java 8:

```
Install AdoptOpenJDK 8 with Homebrew Cask:
  brew cask install homebrew/cask-versions/adoptopenjdk8
```
@claui
Copy link
Contributor Author

claui commented Apr 19, 2019

Holding merge until CI nodes have been switched to AdoptOpenJDK.

@claui claui requested a review from MikeMcQuaid April 19, 2019 16:10
@colindean
Copy link
Contributor

I support this but one thing on my mind is CI automation that installs a formula that would previously install the java package as a dependency will no longer do that automatically. This means changes to the automation, minimally adding brew cask install adoptopenjdk before a formula dependent on java is actually executed.

I'm not sure what we can do about that other than to let user diagnosis of broken automation inform the next steps, aside from some kind of announcement, but seeing as there's no transition period – it just is the way it is now – I'm not sure of the value of that. Maybe this is me shaking my fist at Oracle for doing this kinda suddenly?

@vitorgalvao
Copy link
Contributor

What about HBC? Presumably we’ll have to change our java8 messaging to recommend adoptopenjdk8.

  • Should we include the other adoptopenjdk versions as well?
  • AdoptOpenJDK has an external tap, meaning we’ll have some duplication efforts. How should we deal with those? If they wish to remain independent but we still want those casks in the main repos, I’m willing to build a script/bot that will pull their versions daily.
  • What about the depends_on_java caveats? Should they start recommending AdoptOpenJDK instead?
  • Should we keep the java casks, or being proactive about Oracle rename them to oracle-java, meaning no cask will ever again be the Java but a Java?

@claui
Copy link
Contributor Author

claui commented Apr 19, 2019

  • What about the depends_on_java caveats? Should they start recommending AdoptOpenJDK instead?

@vitorgalvao Very good catch! You’re right, and I missed them in the code. Yes, I need to change it there, too.

What about HBC? Presumably we’ll have to change our java8 messaging to recommend adoptopenjdk8.

Apart from the depends_on_java thing, I couldn’t find anything else that involves recommendations.

  • Should we include the other adoptopenjdk versions as well?

You mean, add them as casks (to homebrew-cask-versions)? We absolutely need to discuss that and make a decision. I’m going to follow up in Homebrew/homebrew-cask#57387 as I think that’s where the topic fits best.

  • AdoptOpenJDK has an external tap, meaning we’ll have some duplication efforts. How should we deal with those? If they wish to remain independent but we still want those casks in the main repos, I’m willing to build a script/bot that will pull their versions daily.
  • Should we keep the java casks, or being proactive about Oracle rename them to oracle-java, meaning no cask will ever again be the Java but a Java?

Like above, I’m going to follow up in Homebrew/homebrew-cask#57387.

@claui
Copy link
Contributor Author

claui commented Apr 19, 2019

This means changes to the automation, minimally adding brew cask install adoptopenjdk before a formula dependent on java is actually executed.

@colindean Yes, either that, or maybe pre-install it on the nodes.

I'm not sure what we can do about that other than to let user diagnosis of broken automation inform the next steps, aside from some kind of announcement, but seeing as there's no transition period – it just is the way it is now – I'm not sure of the value of that. Maybe this is me shaking my fist at Oracle for doing this kinda suddenly?

Yea, I’d also rather have spent Good Friday outside instead of dealing with a corporate behemoth’s whimsical episodes.

Any vendor, even AdoptOpenJDK, can throw up a registration wall on a whim and with zero advance notice. I can live with that for now but I’m also open for suggestions.

@apjanke
Copy link
Contributor

apjanke commented Apr 19, 2019

As a Java developer, big 👍 on this.

Many of your Homebrew users might be at work or school or in other contexts that don't count as "personal or non-production use", which is the only free use allowed by the new Oracle JDK licensing. Suggesting a newer Oracle JDK without giving a big ol' license warning could lead to users accidentally putting them in a situation where they've accidentally exposed themselves to Oracle licensing costs or audits; many Homebrew users will have no idea about the new Oracle JDK licensing situation.

Plus I think it's best if you suggest users run the exact same JDK that you're running on the CI servers.

And, as a Java developer and advocate, I think it'd be great if the entire Java-using community moved towards thinking of AdoptOpenJDK as the default, "obvious" choice for a JDK. This would be a nice step in that direction.

@MikeMcQuaid
Copy link
Member

I support this but one thing on my mind is CI automation that installs a formula that would previously install the java package as a dependency will no longer do that automatically.

@colindean I don't understand why you've reached than conclusion considering this is just changing a text string specifying our recommendation. brew cask install java will still work and brew cask install java8 has been broken by changes beyond our control.

  • Should we include the other adoptopenjdk versions as well?

I don't see any requirement from the Homebrew side to do that but have no arguments for or against it.

  • What about the depends_on_java caveats? Should they start recommending AdoptOpenJDK instead?

I think so.

  • Should we keep the java casks, or being proactive about Oracle rename them to oracle-java, meaning no cask will ever again be the Java but a Java?

My $0.02 would be that we eventually consider renaming the adoptopenjdk cask to java (and even moreso same for adoptopenjdk8 to java8) to preserve compatibility with what "we" prioritise.

Plus I think it's best if you suggest users run the exact same JDK that you're running on the CI servers.

And, as a Java developer and advocate, I think it'd be great if the entire Java-using community moved towards thinking of AdoptOpenJDK as the default, "obvious" choice for a JDK. This would be a nice step in that direction.

Strongly agree. There's also an argument here for (I think?) us all broadly being advocates of open source and if we can nudge people from a closed-source solution to a drop-in open source replacement that feels like a win.

@colindean
Copy link
Contributor

I don't understand why you've reached than conclusion considering this is just changing a text string specifying our recommendation

I misunderstood. I thought this was effectively making it so that a formula that depended on java could no longer depend on java to be installed automatically. It is not.

@MikeMcQuaid
Copy link
Member

I misunderstood. I thought this was effectively making it so that a formula that depended on java could no longer depend on java to be installed automatically. It is not.

A formula that depends on Java does not install it automatically.

@colindean
Copy link
Contributor

colindean commented Apr 19, 2019 via email

@MikeMcQuaid MikeMcQuaid merged commit e68fc53 into Homebrew:master Apr 20, 2019
@MikeMcQuaid
Copy link
Member

Thanks for all your work on this @claui! The CI machines have been updated to use brew cask install adoptopenjdk adoptopenjdk8 (FYI @Homebrew/maintainers) so: merged.

@gdams
Copy link
Contributor

gdams commented Apr 20, 2019

Can we now investigate moving the AdopOpenJDK tap into the home brew project otherwise we now have duplicates?

@sjackman
Copy link
Contributor

cc @iMichka

@zbeekman
Copy link
Contributor

Can we now investigate moving the AdopOpenJDK tap into the home brew project otherwise we now have duplicates?

@gdams Whoever controls the tap would need to indicate that it has been migrated to homebrew/homebrew-cask, I believe.

@mfriedenhagen
Copy link

Hopefully adoptopenjdk11 will make it's way to cask-versions as well, as this is the new LTS version.

EricFromCanada added a commit to EricFromCanada/brew that referenced this pull request Sep 19, 2019
@lock lock bot added the outdated PR was locked due to age label Jan 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jenkins: Requires Java 1.8, but no longer installable

9 participants