Fork me on GitHub
#polylith
<
2021-09-11
>
uwo02:09:53

Just installed the polylith tool and very excited to try it out! Was slightly surprised to see that the brew install script also installed java -- I would expect that to be left to the user, given the number of versions and flavors. My 2 cents! (Edit: hmm! clojure cli added it to its deps as well, so I guess that's the fashion now -- sorry to bother!)

seancorfield02:09:19

@U09QBCNBY That is essentially forced on all users of brew that install something that depends on Java. The Clojure core team moved the official Clojure CLI tap to clojure/tools/clojure to avoid that, since the Brew team had updated the clojure tap without consulting the Clojure core team!

πŸ˜… 2
seancorfield02:09:55

It might be a good idea for Polylith to consider maintaining its own tap for brew for the same reason @U1G0HH87L @U2BDZ9JG3

seancorfield02:09:13

But I think most people just add :poly as an alias in their deps.edn file now instead? Or, for recent Clojure CLI versions, install poly as a "tool" -- see https://github.com/polyfy/polylith#install-the-polylith-tool-via-the-clojure-cli

seancorfield02:09:43

That's how I have poly installed globally, so I can say clojure -Tpoly ...

tengstrand04:09:41

Okay, interesting. One of you can also create an issue, if you like, and then I can discuss this with @U2BDZ9JG3 that implemented the brew packaging.

seancorfield05:09:52

https://github.com/polyfy/polylith/issues/131 -- links to the brew issue the Clojure core team had and tags Alex Miller who can probably explain what he had to do to get their own tap up and running.

furkan3ayraktar06:09:21

In Clojure Formula, it’s not stated that it depends on Java. Polylith states specifically it depends on Java. This got me some questions, what happens if someone installs Clojure without installing Java?

seancorfield17:09:52

You'll have to talk to Alex about it then. I know zero about brew other than what I've linked to above.

seancorfield17:09:43

Here's the core brew formula: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/clojure.rb -- note that it has the dependency on openjdk which is what causes the latest JDK to be forced on users, whereas Clojure's own tap doesn't have that dependency at all. So I guess the assumption is that users without Java must install their own version to support the Clojure CLI.

seancorfield17:09:21

This is the commit where the brew team changed the Clojure formula: https://github.com/Homebrew/homebrew-core/commit/715900bfab494ccee4cadeea902d80ccce6e7a16 -- it used to depend on java => "1.8+"

seancorfield17:09:11

That's the sum of my brew knowledge at this point. LMK if you want me to add these links to the Polylith issue so they don't get lost!

πŸ™ 2
furkan3ayraktar06:09:36

Thanks! I think we can just remove Java dependency from Polylith formula and change the shell script slightly to give a warning to user in case the user tries to run Polylith without Java.

πŸ‘ 4
2
furkan3ayraktar11:09:42

I have updated the brew formula so that it does not depend on Java anymore. You can check out the commit https://github.com/polyfy/homebrew-polylith/commit/3578c813bc776dae10cdbe9a0f61754b2ae2ab71. I posted a detailed comment on https://github.com/polyfy/polylith/issues/131. Thanks for the help again! πŸ’ͺ

polylith 4
seancorfield12:09:34

Looks good to me.

βœ… 2