Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

211–220 of 314 posts

Re: Ask HN: Best Alternative to Homebrew in 2021?

#211
First of all, don't install Python packages with OS package manager, period. Never do that. Use "pip install" instead.

Second,Python ecosystem/tooling is a mess, so isolate it if possible. One way to do it is Conda https://docs.conda.io/en/latest/

I understand that's not always possible as a shitload of soft has now Python as a dependency, but still.

And the last. One package manager seems to be missed in the discussion is PKGIN/PKGSRC https://pkgsrc.joyent.com/install-on-osx/ It is the native package manager on SmartOS/illumos/OpenIndiana/OpenSolaris, NetBSD, and Minix. It is stable and fast. I doubt you get your GUI soft there tho.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#212

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

Can't you keep both python 3.10 and python 3.09, for older apps that rely on it? Sure, not optimal, but hard disk space is cheap these days .. Ideally, each app would list hashes of packages it depends on, so that everyone is happy.

What about applications that just reference “python” (or any other dependency), without specifying a particular version?

AFAIK homebrew cannot automatically modify $PATH before starting a program such that $PATH points to the correct dependencies for that program. If you have multiple versions of some dependency installed, it is up to you to run `brew switch` before running your program to manually set the correct versions for each dependency.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#213
I would suggest to not use brew for anything that depends on python, ruby etc. Most of the time you can use e.g. asdf to manage all your dev dependencies. Also, most softwares allow you to install them without hombrew. (e. g. https://postgresapp.com/ for postgres). I have seen so many installations screwed up because hombrew upgraded some packages without requiring a confirmation from the user. It's a bit unfortunate given that so many packages are on hombrew.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#214
I built a feature in arkade [1] to pull in binaries for CLIs for infrastructure and developer tooling that I wanted to use - it now has 72 CLIs that you can pull down with a single command and most importantly, as near to instantly as you're going to get.

For instance: arkade get kubectl@v1.22.1 yq helm faas-cli

It's not got anywhere near the catalog of brew, and doesn't compile software, or help you find lib-xyz for your Yubikey, but it is really fast and has a growing community behind it.

It works on MacOS, Linux, Windows and arm hosts to determine the correct download URL and pull in a binary.

[1] https://github.com/alexellis/arkade

Contributions are welcome.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#215

I just reached the same breaking point -- and normally I am pretty sympathetic to software jank, but the maintainer of homebrew is so actively hostile and rude that my degree of empathy is significantly less -- and switched to Nix, which is quite good, conditional on three gotchas: 1. Nix has very limited support for GUI applications of the kind that you'd find in `brew cask`. Not no support, some of them are there,…

I had R working with Nix on my work Macbook, but this was on a version of Nixpkgs from several months ago. Of course, one of the upsides with Nix is that I can look up the exact version of Nixpkgs that was working for me because it's in a git repo with the rest of my dotfiles :).

Re: Ask HN: Best Alternative to Homebrew in 2021?

#216

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

Mike - just wanted to say thanks for all you (and the other Homebrew volunteers) do! My mac dev experience is 100x better with Homebrew - it's literally the first thing I install when I get a new machine. Perhaps in situations like this Homebrew could alert the user "Hey, this package hasn't been updated in a while and 40 other packages depend on it so this is going to take a while. Press enter to confirm or cancel a…

It's not as simple as you think: consider headless setups.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#217

Earlier quoted context omitted.

What’s an actual concrete example of a problem you have with homebrew?

It’d be nice if it asked if it’s ok to remove old versions of dependencies when installing a new package. It’d also be nice for it to not upgrade, say, wireshark and nginx when installing, say, ffmpeg, without asking first.

You might be interested in `HOMEBREW_NO_INSTALL_CLEANUP` and `HOMEBREW_NO_CLEANUP_FORMULAE`. See `man brew` for details.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#218

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

I appreciate all your hard work and I like Homebrew, but I think updating high-level packages when a descendent dependency is updated is the wrong behavior - at least in this example. If Postgres has an unversioned dependency to PackageX, the only time I might expect Postgres to be updated automatically is if I update PackageX across a major version boundary, risking breaking changes. Even then, I'm not sure I'd want…

> If Postgres has an unversioned dependency to PackageX, the only time I might expect Postgres to be updated automatically is if I update PackageX across a major version boundary, risking breaking changes.

Homebrew doesn't meaningfully have versioned or unversioned dependencies, because it doesn't incorporate any notion of version into its dependency solver. When you declare a dependency on `python@3.9`, you're not telling `brew` that ‘I need a copy of the package `python` which satisfies the constraint “version is 3.9.x”.’ Homebrew just treats `python@3.9` as the name of a package which is a whole copy of python, and it can exist alongside other, similar packages like `python@3.8` and `python@3.10`.

Homebrew only incorporates this kind of `@` syntax for select packages of which maintainers have elected to maintain multiple versions. By my count, there are 81 such packages in homebrew-core, and the following is a complete list of all of those which appear in a `depends_on` declaration:

  antlr
  atkmm
  autoconf
  cairomm
  db
  elasticsearch
  erlang
  gcc
  ghc
  glibmm
  go
  gradle
  guile
  hdf5
  headers
  helm
  isl
  libfuse
  llvm
  lua
  mbedtls
  mysql
  node
  numpy
  openexr
  openjdk
  openssl
  pangomm
  php
  proj
  pyqt
  pyside
  python
  qt
  ruby
  swig
  synth
  tbb
  vtk
  wxwidgets
So when you look at a Postgres formula in the Homebrew repos and see that it declares an ‘unversioned’ dependency on openldap, for example[1], that does not mean that the formula author has declared ‘any version is fine’, i.e., it does not mean that the dependency is unversioned. It just means that the dependency's version constraints are totally unspecified except implicitly as ‘the only version of that package which is simultaneously present in the glorious monorepo of build recipes’.

This is a feature it shares with some source-based package management systems, like Nix and Guix. Those package managers solve this problem by basically vendorizing everything, so installing a new package never upgrades anything else you have installed.

Other source-based package management systems, like Portage and Pkgsrc, have extended their model to include some handling of version constraints, but they also sometimes declare dependencies without specifying a version. That seems dubious to me, since in reality there pretty much always are version constraints that ought to be specified there, but maybe those two projects are mature enough that they've hammered out the problematic cases by now.

https://github.com/Homebrew/homebrew-core/blob/master/Formul...

Re: Ask HN: Best Alternative to Homebrew in 2021?

#219
post #160

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

OP here, thanks for clarifying this - I can imagine it's a super complex problem and I truly appreciate all the work that you (and other contributors) have put into this project. My only point (and a source of confusion) here is that I never anticipated the cascading effect that installing a single package can have on seemingly unrelated parts of the system. I've been using homebrew for many years and as far as I rem…

There's more than one way to skin a cat.

Personally, I have moved to downloading large things (Python, Postgres by your example) as standalone apps, and only use Homebrew for small libraries and CLI tools. I think that makes more sense.

You can download all of the Mac Python versions you want from python.org and you can get Postgres from postgresapp.com which provides a nice toolbar interface to start and shutdown servers of various versions.

Post reply on HN