News for hackers. Stuff that matters.
Re:Homebrew 2.0.0 released by bkanber on Saturday February 02, 2019 @09:39AM (#19063175)
Know what annoys me about Brew? This just happened last night. I had some package that required readline 7.x; Brew uses readline 8 now. It's not possible to simply command `brew install readline@7`. It took me 30 minutes to figure out that I had to cd into the homebrew-core directory, search through github commit history to find an old commit that used readline 7, checkout that specific commit, brew install readline, checkout master again, and then pin readline.

A package manager should not make it that difficult to downgrade a package.

Otherwise -- homebrew's great.

Re:Homebrew 2.0.0 released by mikemcquaid on Saturday February 02, 2019 @10:39AM (#19063516)
Can't save you your 30m now but `brew extract` should make this process much easier for future.

> Usage: brew extract [options] formula tap

> Look through repository history to find the most recent version of formula and create a copy in tap/Formula/[email protected]. If the tap is not installed yet, attempt to install/clone the tap before continuing.

Re:Homebrew 2.0.0 released by ab on Thursday February 07, 2019 @11:45PM (#19111605)
This is a poor way to handle library upgrades that are guaranteed to break any existing compiled binaries.

Frustrating that my PR to create readline@7 was rejected. https://github.com/Homebrew/homebrew-core/pull/36782

I would at least like to see some mechanism to exclude a Formula from automatic gc of old versions besides brew pin. Libraries don't take up significant space, and they cause a world of hurt to delete out from under compiled binaries, so there is not a good argument for automatically deleting them.

Re:Homebrew 2.0.0 released by bhaak on Saturday February 02, 2019 @11:05AM (#19063678)
I would say that a package manager shouldn't break the runtime dependencies of your installed programs. That's really a poor design.

But you can also just copy the previous version into the new readline directory.

cp /usr/local/Cellar/readline/7.0.5/lib/lib*.7.dylib /usr/local/opt/readline/lib/

Although this will break with the next readline update.

Re:Homebrew 2.0.0 released by bkanber on Saturday February 02, 2019 @11:09AM (#19063695)
That only works if you have the previous version on your machine, which we did not.
Re:Homebrew 2.0.0 released by bhaak on Saturday February 02, 2019 @12:49PM (#19064425)
But then that package you wanted to install was not a Homebrew package?

Otherwise the dependency management in Homebrew is even worse than I knew.

Re:Homebrew 2.0.0 released by crgwbr on Saturday February 02, 2019 @10:03AM (#19063301)
You can also brew install with the Github URL of a formula at a specific version. That simplifies the process somewhat, but yeah, it should be much much easier than this.
Re:Homebrew 2.0.0 released by frereubu on Saturday February 02, 2019 @10:30AM (#19063460)
Possibly my ignorance talking in terms of what you're trying to achieve, but can't you just do this?

  brew remove packagename

  brew install packagename@versionnumber --force --overwrite
I've done this with Node so I'm using 10 rather than 11.

Edit: my pet gripe with brew is the services syntax. I want to use this:

  brew services httpd restart
Not the existing syntax:

  brew services restart httpd
But in general I'm really thankful that brew exists and it's in active development.
Re:Homebrew 2.0.0 released by bkanber on Saturday February 02, 2019 @10:59AM (#19063624)
The problem with that is, using readline 7 as an example, you need to have had readline 7's image cached on your machine, or it still needs to be 'tappable' or whatever in order to do that. In this case, brew master _only_ had readline 8 available, so if you never had readline 7 installed on your machine, it was inaccessible without bothersome workarounds.

In most cases, brew just works. That's great. But it's also used primarily by developers, and I can't imagine this is an uncommon scenario.

Re:Homebrew 2.0.0 released by saagarjha on Saturday February 02, 2019 @10:34AM (#19063479)
This only works when the maintainers have decided to keep around the old version of the software, which is only done for certain popular formulae. Otherwise they get removed quite quickly from the main tap.
Re:Homebrew 2.0.0 released by frereubu on Saturday February 02, 2019 @10:55AM (#19063598)
Ah, I see. Thanks for the clarification.
Re:Homebrew 2.0.0 released by shaki-dora on Saturday February 02, 2019 @10:34AM (#19063485)
There are older versions of some, usually larger, libraries n brew, such as node@10. But those are maintained explicitly in cases where some other important package depends on them. “Node@10” is really more of a different package than name@version.
Re:Homebrew 2.0.0 released by lastobelus on Friday February 08, 2019 @10:17PM (#19120472)
this happened to me too. And since brew upgrade now also does cleanup by default, I did not have realine 7 around anymore. No information offerred on how to get it back, just wasted dev time.