Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Unify formulas for IntelliJ-based IDEs #879

Closed
26 tasks done
sebroeder opened this issue Mar 26, 2015 · 19 comments
Closed
26 tasks done

Unify formulas for IntelliJ-based IDEs #879

sebroeder opened this issue Mar 26, 2015 · 19 comments

Comments

@sebroeder
Copy link
Contributor

The following formulas are affected in homebrew-versions:

Things that could/should be unified:

  • Download URLs:

    • download over https instead of http (CloudFlare does not work over http, use direct download link starting with https://download.jetbrains.com/
  • Add name stanzas

  • License:

    • :apache for Community Editions (-ce)
    • :commercial for everything else
  • Remove plist hack, replace with the following caveat (see Remove hack for IntelliJ IDEs, replace with caveat homebrew-cask#9943 for details):

    caveats <<-EOS.undent
      #{token} requires Java 6 like any other IntelliJ-based IDE.
      You can install it with
    
        brew cask install caskroom/homebrew-versions/java6
    
      The vendor (JetBrains) doesn't support newer versions of Java (yet)
      due to several critical issues, see details at
      https://intellij-support.jetbrains.com/entries/27854363
    EOS
    • caveat not necessary for formulas with bundled JDK
  • Handling of version number interpolation vs. hard-coding in app and zap stanzas

    • hard-coding might be the most portable between similar formulas, easiest to maintain
    • check whether #{version.gsub('.','')} actually matches names in file system for formulas with version number x.y.z (major, minor, patch level), since JetBrains usually only uses x or xy there.
  • List of files/folders for zap should be as complete as possible, check at least:

    • ~/Library/Application Support/
    • ~/Library/Preferences/
    • ~/Library/Caches/
    • ~/Library/Logs/
  • Add a conflicts_with :cask => 'some_cask_without_bundled_jdk' stanza to casks with bundled JDK (this stanza is not functional yet so it is not a strict requirement, just nice to have going forward).

@sebroeder sebroeder changed the title Unify formulas for IntelliJ-based IDEs as much as possible Unify formulas for IntelliJ-based IDEs Mar 26, 2015
@sebroeder
Copy link
Contributor Author

Before I start working on this, some feedback would be very welcome.

I was not sure where I should fill an identical issue in homebrew-cask. The goal would be to have the formulas unified as much as possible between both homebew-versions and homebrew-cask.

@radeksimko
Copy link
Contributor

direct download or CloudFlare CDN?

that depends on which one is prefered by vendor (JetBrains) providing an official source - i.e. download page. If there's no preference (they're ok with either of those two), I'd probably go for faster source (probably CDN). We don't support "mirrors" yet.

download over https instead of http (are there any downsides to this?)

I can't see any downsides in https except for people having some older versions of curl and generally older versions of OpenSSL-related libraries, but we should push them to upgrade anyway and prevent them from using unsecure old versions anway, so HTTPS 👍

caveat not necessary for formulas with bundled JDK

Good point, but please do double check that all IDEs are capable starting correctly without any further dependencies on a fresh OSX with a fresh brew+cask = there should be no hidden dependencies.
Unless you've got your own setup, feel free to look here.

Handling of version number interpolation vs. hard-coding in app and zap stanzas
hard-coding might be the most portable between similar formulas, easiest to maintain
check whether #{version.gsub('.','')}

like you mentioned in the second point, the filename doesn't exactly match the original version, which is making it a bit harder to reuse, I don't have a strong opinion here. I think as long as it's all the same across all mentioned casks, I'm personally fine with that.

List of files/folders for zap should be as complete as possible, check at least:

Agreed.

I will have a look at the RubyMine PRs probably during the weekend unless another maintainer picks it up sooner.
Overall thanks for the effort, looking forward to upcoming PRs! 👍 😺

@sebroeder
Copy link
Contributor Author

For the EAP-builds that come both with and without a -bundled-jdk formula I have added the following caveat to the formula without the bundled JDK (the last paragraph is new):

  caveats <<-EOS.undent
    #{token} requires Java 6 like any other IntelliJ-based IDE.
    You can install it with

      brew cask install caskroom/homebrew-versions/java6

    The vendor (JetBrains) doesn't support newer versions of Java (yet)
    due to several critical issues, see details at
    https://intellij-support.jetbrains.com/entries/27854363

    JetBrains provides an alternative installer for #{token} that
    bundles a custom JDK. You can install it with

      brew cask install caskroom/homebrew-versions/#{token}-bundled-jdk
  EOS

What do you think @radeksimko? Too long? Not clear enough? Not necessary?

@radeksimko
Copy link
Contributor

What do you think @radeksimko? Too long? Not clear enough? Not necessary?

I remember we've been recently discussing the need for different recommendation stanza (things user may want to know, but if he doesn't, it won't disrupt it his experience).

I think I understand your intention and like I said before, I understand you see bundled versions as a solution to non-bundled, but I don't think we should be pushing user to do that.

I'd be happy to have following:

JetBrains provides an alternative installer for #{token} that
    bundles a custom JDK. You can install it with

      brew cask install caskroom/homebrew-versions/#{token}-bundled-jdk

somewhere on the side as "FYI", but not as par of caveats.

Otherwise, LGTM.

@sebroeder
Copy link
Contributor Author

I think I understand your intention and like I said before, I understand you see bundled versions as a solution to non-bundled, but I don't think we should be pushing user to do that.

OK, I removed the last paragraph from the caveats in #886.

@texastoland
Copy link
Contributor

First, WebStorm also has a bundled version. Second, Would it make sense to unify these on top of a common JetBrains cask? url, zap, and caveats are shared between them hence this issue.

@sebroeder
Copy link
Contributor Author

First, WebStorm also has a bundled version. Second, Would it make sense to unify these on top of a common JetBrains cask? url, zap, and caveats are shared between them hence this issue.

Thanks for the PR @dnalot, I added webstorm-bundled-jdk to the list. AFAIK casks don't support inheritance (yet), otherwise a common jetbrains or at least webstorm cask sounds like an idea worth exploring. I guess the problem here might be preventing the user from trying to install the common jetbrains cask directly.

@texastoland
Copy link
Contributor

My basic idea was to include jetbrains-base inside the cask block for each of these. jetbrains-base would raise Hbc::CaskInvalidError with a helpful message outside of a cask block context otherwise def jetbrains(pairs={}) called like jetbrains :jdk => :bundled. When called it should merge url, zap, and caveats based on @name, @version, and @token (checked for '-bundled-jdk' unless passed explicitly). @radeksimko Too hacky?

@radeksimko
Copy link
Contributor

@dnalot
As @sebroeder mentioned above, there isn't any inheritance support and I'm not sure this is the right place to discuss this ("Unify formulas for IntelliJ-based IDEs")

The good message is that nothing is preventing you from creating a new thread about this in the main repository: https://github.com/caskroom/homebrew-cask/issues/new

We'll need to evaluate all aspects of the problem - e.g. DSL, maintenance overhead, how many casks would benefit from it etc. and then it will eventually get implemented by someone.

If you feel confident enough, feel free to send a pull request so we can debate about the code and move things forward faster.

@texastoland
Copy link
Contributor

@radeksimko Because I don't think it's generally useful is why I made the recommendation above solely for unifying these casks (per the issue title). The only problem I foresee would be having a jetbrains-base cask that's really just an include for others. Did my explanation make sense? I don't mind sending a PR but would rather save time if you think it's not a good idea.

@radeksimko
Copy link
Contributor

Did my explanation make sense? I don't mind sending a PR but would rather save time if you think it's not a good idea.

Partially did, but I don't want to lost good intentions and ideas here in this thread and I do want to expose this idea to other maintainers who don't check homebrew-versions very often.

If you feel you'd be wasting time by sending a PR, just open an issue there, still much better than keep commenting here.

@sebroeder
Copy link
Contributor Author

Please welcome rubymine-bundled-jdk to the list.

@sebroeder
Copy link
Contributor Author

I added clion-bundled-jdk and a comment about the conflicts_with stanza (thanks @andystanton).

@rubendura
Copy link

I just want to point out that with the release of PyCharm 4.5 there is now a bundled JDK (1.8) download that should probably be added to the list.

@sebroeder
Copy link
Contributor Author

I just want to point out that with the release of PyCharm 4.5 there is now a bundled JDK (1.8) download that should probably be added to the list.

I am a little slow at the moment but #1017 adds PyCharm 4.5.1 and #1018 adds PyCharm CE 4.5.1 with the bundled JDK.

@sebroeder
Copy link
Contributor Author

PRs for the formulas in the list that are not unified yet would be much appreciated since I don't have much time to work on this at the moment.

If we see a version-bump-only-PR for one of those formulas, it would be great if we could link to this issue and kindly ask the committer, whether she would be willing to work a little more on the formula before merging it in. (I know the caskroom team has even less time than I do, so if you can't do this, I can totally understand.)

@sebroeder
Copy link
Contributor Author

With IntelliJ Idea 15 EAP Jetbrains is starting to release the latest versions of its IDEs with a bundled custom JDK only and does not offer downloads without the bundled JDK anymore (as far as I can tell). Since IntelliJ is the technical foundation for all the other Jetbrains IDEs I am pretty sure this change will trickle down into the other products soon.

I had a discussion about bundled JDK vs. non-bundled JDK versions a while ago in #849 and this topic becomes now relevant again.

For all Jetbrains EAP products that come only with a bundled JDK version, I would like to remove the old <productname>-eap casks and rename the <productname>-eap-bundled-jdk casks to <productname>-eap instead (adjusting download URLs if needed, of course).

I am more than happy about this development, because it cuts the number of casks we have to maintain in half, improving the possibility that this issue might actually be completed one day 😆. It is hopefully also a little less confusing for the users, since Jetbrains never did a good job explaining the bundled JDK vs. non-bundled JDK version.

Since this a bigger change I’d like to get some feedback from @vitorgalvao and @radeksimko before I start and of cause from everybody else who is using the Jetbrains EAP casks. Would this change affect our users in some negative way and/or are additional steps needed to make the transition painless?

@vitorgalvao
Copy link
Member

I’m in total agreement with that change. There aren’t any major issues this’ll cause.

fanquake added a commit to Homebrew/homebrew-cask that referenced this issue Aug 18, 2015
Per Homebrew/homebrew-cask-versions#879

An updated version of 0xDBE EAP is being added to the version repo in Homebrew/homebrew-cask-versions#1207
kuno pushed a commit to kuno/homebrew-cask that referenced this issue Sep 10, 2015
Per Homebrew/homebrew-cask-versions#879

An updated version of 0xDBE EAP is being added to the version repo in Homebrew/homebrew-cask-versions#1207
@fanquake
Copy link
Contributor

I'm closing this now, and opening a new issue to follow up with transitioning the EAP casks to the bundled JDK versions.

kstarsinic pushed a commit to kstarsinic/homebrew-versions that referenced this issue Oct 19, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants