Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

201–210 of 314 posts

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

#201
post #83

Earlier quoted context omitted.

It's hard to pinpoint what the problem really is, but me and a few colleagues had corrupted brew installations lately, where various things would just randomly stop working after updating a single package. The trick of disabling auto updates doesn't really work when you do want things to be updated. Sometimes there are conflicts and the usual path was to upgrade everything. Not that it matters: it seems that the usua…

Could you give (or point to) a description how compiling binaries using GitHub Actions can be done? Sounds really nice. :)

Sure!

     - Use the workflow_dispatch type so it can be manually triggered. Or schedule if you want it to run periodically.
     - Install dependencies like automake/cmake and libraries using brew (I cheat here a bit)
     - Clone the repository
     - Perform the steps for building a static build
     - Use actions/upload-artifact@v2 to upload the executable.
It's simple, although to get it right with some programs. The advantage is that with one click you can download it, put in your path, and it won't need special paths.

Here's an example with jq: https://pastebin.com/gHu8dTgQ

Honestly the best option is asking maintainers of each program to add a static build to their projects in order to make their projects able to run without installing dependencies. Problem is, some maintainers are very anti-static-compiling.

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

#202

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 didn't know before this post that Homebrew's infamous ‘auto-update’ only automatically updated the dependency closure of whatever you were installing/upgrading, which sounds more or less correct to me.

> Now, Homebrew has a choice. Either we upgrade _everything_ that depends on `python@3.10` that you have installed or we knowingly break some of the things you have installed that depend on `python@3.10`. We choose the safer option by default.

A look at the formulae in homebrew-core shows that Homebrew basically doesn't consider versions in its dependency management at all, so formula are just using the ‘@x.y.z’ in place of all manner of version constraints. So you get wild stuff like this line here[1]:

    depends_on "curl" # curl >= 7.55 is required
wat.

Of course the recursive update policy is going to be weirdly painful for some users! Homebrew doesn't even attempt to encode some very basic aspects of dependency, so now (a) you can't know what you're going to break if you do upgrade a common dependency and (b) you can't know when you can afford not to upgrade a dependency shared by a package you're about to install and the already-installed system. The choice you outline above is one that is not faced by most package managers, because they don't make this mistake. The naive wheel reinvention with Homebrew is so eternally disappointing, and it explains a lot of the pain users experience with it.

> Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated)

One relatively non-disruptive thing you might be able to do to make this behavior less surprising to users is (offer a way to?) print the dependency tree for package installations/upgrades that pull in upgrades of their ‘siblings’. You'd probably want to just do it in a textual way, but this project seems to model the kind of logic you'd want for printing dependency trees with Homebrew as it exists.[2]

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

2: https://github.com/martido/homebrew-graph/blob/master/cmd/br...

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

#203
post #141
post #83

Earlier quoted context omitted.

It's hard to pinpoint what the problem really is, but me and a few colleagues had corrupted brew installations lately, where various things would just randomly stop working after updating a single package. The trick of disabling auto updates doesn't really work when you do want things to be updated. Sometimes there are conflicts and the usual path was to upgrade everything. Not that it matters: it seems that the usua…

> Also, the maintainers have a super weird aversion to everything that is "too simple". I've seen packages rejected because "the build process was too simple and there are no dependencies". The excuse was that "users can build it themselves". This is not for silly stuff random people wrote on weekend, this is for 20 year old tools used in production written in C. wtf? What could be the possible motivation for this? I…

> this sounds downright medieval to me, like why even use macOS for development if the software management tools are so bad that that's what you're doing

Because it's only one tool that really sucks: Brew. For the languages I specified, it works quite well. Even using C++ with vendored dependencies works better than average in macOS for me.

For most of those languages I mentioned, Brew already offloads the real installation and updating of the language itself to a language manager (via rvm/rbenv, nvm, pyenv, rustup, whatever), so it doesn't make a difference, except without Brew I get a more stable, officially supported, environment.

Also, DotNet was a Cask until a few months ago, so they effectively were just downloading something from the official website just like me.

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

#204

Why did you want to `brew install virtualenv`? That’s no longer the current way to work with python. Virtual environments are now in the standard library: python -m venv /my/directory I’ve never had any problem with homebrew in over a decade’s usage. But yes, don’t use it for python development tooling: use pyenv and python -m venv and pip for that.

Me 11 minutes from now: "why did you use venv? They replaced that 11 minutes ago with ..."

No. If you’re not an experienced python programmer then I can see that your comment might seem like a witty contribution. But I was actually providing good advice.

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

#205

Earlier quoted context omitted.

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…

+1 I love homebrew. I just set up my new M1 Max machine and half of the setup work was just brew commands to install cli stuff and casks <3. It's such a joy to not need to go to a bazillion websites to download dmgs

what a flex on your new M1 MAX ;) But yeah, homebrew should ship as default with any OS X at this point...

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

#206

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,…

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.

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

#207
I am Python dev and I never heard of someone using brew to install virtualenv before. I think that you are using brew for the wrong purposes, I suggest the following instead:

- Python already includes the venv module, you don't need to install anything, just run `python -m venv `

- You should manage multiple versions with pyenv instead of brew. Pyenv can be installed with brew.

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

#208

Earlier quoted context omitted.

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…

+1 I love homebrew. I just set up my new M1 Max machine and half of the setup work was just brew commands to install cli stuff and casks <3. It's such a joy to not need to go to a bazillion websites to download dmgs

did brew leaves from your old machine not hey you a transferrable list of packages?

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

#209
post #17

I think, you don't need to choose any other package manager because homebrew is the most mature thing on macos. Just disable autoupdate when installing something: HOMEBREW_NO_AUTO_UPDATE=1 brew install

This looks like a really awful solution. Does homebrew not ask the users on each run whether they want update something and warns them about the dangers? Like a responsible software?

It does not.

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

#210

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_…

this is why I love HN!

Thanks for all the work you put in homebrew, I really appreciate it. Just upgraded to Monte Rey a few days ago and I was kind of fearful that some of the things that I needed where not going to work... nop, every singe package that I've needed so far was installed successfully.

Thanks!

Post reply on HN